Skip to content

Commit

Permalink
Make manual_seed an autouse fixture for gnn_fraud_detection_pipeline …
Browse files Browse the repository at this point in the history
…tests (#1165)

* thd `manual_seed` fixture for `gnn_fraud_detection_pipeline` is now set to autouse
* fixes #1164

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Eli Fajardo (https://github.com/efajardo-nv)

URL: #1165
  • Loading branch information
dagardner-nv authored Aug 31, 2023
1 parent 4ae80d0 commit 0351ae2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
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

0 comments on commit 0351ae2

Please sign in to comment.