Skip to content

Commit

Permalink
Merge branch 'main' into divert
Browse files Browse the repository at this point in the history
  • Loading branch information
annahedstroem authored Apr 4, 2023
2 parents 3ed1edc + 609255a commit 3058c25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
black quantus
- name: Test with pytest
run: |
pytest
pytest -s -v
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ def titanic_model_tf(titanic_dataset):
return model


@pytest.fixture(scope="session", autouse=True)
@pytest.fixture(scope="session")
def titanic_dataset():
df = pd.read_csv("tutorials/assets/titanic3.csv")
df = df[["age", "embarked", "fare", "parch", "pclass", "sex", "sibsp", "survived"]]
df["age"] = df["age"].fillna(df["age"].mean())
df["fare"] = df["fare"].fillna(df["fare"].mean())

df_enc = pd.get_dummies(df, columns=["embarked", "pclass", "sex"]).sample(frac=1)
X = df_enc.drop(["survived"], axis=1).values
Y = df_enc["survived"].values
X = df_enc.drop(["survived"], axis=1).values.astype(np.float)
Y = df_enc["survived"].values.astype(np.int)
_, test_features, _, test_labels = train_test_split(X, Y, test_size=0.3)
return {"x_batch": test_features, "y_batch": test_labels}

0 comments on commit 3058c25

Please sign in to comment.