From 7ec7d725154e797b785687440b084bd91f5940a1 Mon Sep 17 00:00:00 2001 From: RohitRathore1 Date: Thu, 18 Jan 2024 14:39:58 +0530 Subject: [PATCH] Made into a pytest.fixture --- tests/test_smoke_eval.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_smoke_eval.py b/tests/test_smoke_eval.py index 40cd17fa..7308f8c0 100644 --- a/tests/test_smoke_eval.py +++ b/tests/test_smoke_eval.py @@ -17,11 +17,9 @@ ] -# TODO make into a pytest.fixture? +@pytest.fixture def setup_elicit( - tmp_path: Path, - dataset_name="imdb", - model_path="sshleifer/tiny-gpt2", + tmp_path: Path, dataset_name="imdb", model_path="sshleifer/tiny-gpt2" ) -> Elicit: """Setup elicit config for testing, execute elicit, and save output to tmp_path. Returns the elicit run configuration. @@ -114,7 +112,7 @@ def eval_assert_files_good(elicit: Elicit, transfer_datasets: tuple[str, ...] = @pytest.mark.gpu -def test_smoke_eval_run_tiny_gpt2(tmp_path: Path): +def test_smoke_eval_run_tiny_gpt2(tmp_path: Path, setup_elicit): elicit = setup_elicit(tmp_path) transfer_datasets = ("christykoh/imdb_pt",) eval_run(elicit, transfer_datasets=transfer_datasets)