Skip to content
Open
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
8 changes: 3 additions & 5 deletions tests/test_smoke_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down