Skip to content

Commit b4e4ab2

Browse files
author
Dylan Huang
committed
fix
1 parent 0a5b87a commit b4e4ab2

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

tests/pytest/test_pytest_ids.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def eval_fn(row: EvaluationRow) -> EvaluationRow:
4545

4646
# Manually invoke all parameter combinations within a single test
4747
for ds_path in dataset_paths:
48-
await eval_fn(model="dummy/local-model", dataset_path=[ds_path])
48+
await eval_fn(dataset_path=[ds_path], completion_params={"temperature": 0.0, "model": "dummy/local-model"})
4949

5050
# Assertions on IDs generated by the decorator logic
5151
assert len(logger.read()) == 38
@@ -89,12 +89,15 @@ def eval_fn(row: EvaluationRow) -> EvaluationRow:
8989
"tests/pytest/data/markdown_dataset.jsonl",
9090
"tests/pytest/data/markdown_dataset.jsonl",
9191
]
92-
input_params_list = [{"temperature": 0.0}, {"temperature": 1.0}]
92+
completion_params_list = [
93+
{"temperature": 0.0, "model": "dummy/local-model"},
94+
{"temperature": 1.0, "model": "dummy/local-model"},
95+
]
9396

9497
# Manually invoke all parameter combinations within a single test
9598
for ds_path in dataset_paths:
96-
for params in input_params_list:
97-
await eval_fn(model="dummy/local-model", dataset_path=[ds_path], input_params=params)
99+
for params in completion_params_list:
100+
await eval_fn(dataset_path=[ds_path], completion_params=params)
98101

99102
# Assertions on IDs generated by the decorator logic
100103
assert len(unique_invocation_ids) == 1

0 commit comments

Comments
 (0)