Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make manual_seed an autouse fixture for gnn_fraud_detection_pipeline tests #1165

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/examples/gnn_fraud_detection_pipeline/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def config_fixture(config):
yield config


@pytest.fixture(name="manual_seed", scope="function")
@pytest.fixture(name="manual_seed", scope="function", autouse=True)
def manual_seed_fixture(manual_seed):
"""
Extends the base `manual_seed` fixture to also set the seed for dgl, ensuring deterministic results in tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def test_constructor(self, config: Config, xgb_model: str, cuml: types.ModuleTyp
stage = ClassificationStage(config, xgb_model)
assert isinstance(stage._xgb_model, cuml.ForestInference)

@pytest.mark.usefixtures("manual_seed")
def test_process_message(self, config: Config, xgb_model: str, dataset_cudf: DatasetManager):
from stages.classification_stage import ClassificationStage
from stages.graph_sage_stage import GraphSAGEMultiMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def test_constructor(self, config: Config, model_dir: str):
assert stage._record_id == "test_id"
assert stage._target_node == "test_node"

@pytest.mark.usefixtures("manual_seed")
def test_process_message(self,
config: Config,
training_file: str,
Expand Down