Skip to content

Commit d4d6cef

Browse files
authored
Refactor handle_persist_flow to use find_eval_protocol_dir for experiment results path (#222)
1 parent b42b3e1 commit d4d6cef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

eval_protocol/pytest/handle_persist_flow.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import re
88
from typing import Any
99

10+
from eval_protocol.directory_utils import find_eval_protocol_dir
1011
from eval_protocol.models import EvaluationRow
1112
from eval_protocol.pytest.store_experiment_link import store_experiment_link
1213
import requests
@@ -25,7 +26,8 @@ def handle_persist_flow(all_results: list[list[EvaluationRow]], test_func_name:
2526
if row.execution_metadata and row.execution_metadata.experiment_id:
2627
experiments[row.execution_metadata.experiment_id].append(row)
2728

28-
exp_dir = pathlib.Path("experiment_results")
29+
eval_protocol_dir = find_eval_protocol_dir()
30+
exp_dir = pathlib.Path(eval_protocol_dir) / "experiment_results"
2931
exp_dir.mkdir(parents=True, exist_ok=True)
3032

3133
# Create one JSONL file per experiment_id

0 commit comments

Comments
 (0)