From e11a8d75f3106491597548f74136f5853f0216e2 Mon Sep 17 00:00:00 2001 From: Dylan Huang Date: Fri, 26 Sep 2025 11:46:06 -0700 Subject: [PATCH] Refactor handle_persist_flow to use find_eval_protocol_dir for experiment results path --- eval_protocol/pytest/handle_persist_flow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eval_protocol/pytest/handle_persist_flow.py b/eval_protocol/pytest/handle_persist_flow.py index 6db75098..ff386873 100644 --- a/eval_protocol/pytest/handle_persist_flow.py +++ b/eval_protocol/pytest/handle_persist_flow.py @@ -7,6 +7,7 @@ import re from typing import Any +from eval_protocol.directory_utils import find_eval_protocol_dir from eval_protocol.models import EvaluationRow from eval_protocol.pytest.store_experiment_link import store_experiment_link import requests @@ -25,7 +26,8 @@ def handle_persist_flow(all_results: list[list[EvaluationRow]], test_func_name: if row.execution_metadata and row.execution_metadata.experiment_id: experiments[row.execution_metadata.experiment_id].append(row) - exp_dir = pathlib.Path("experiment_results") + eval_protocol_dir = find_eval_protocol_dir() + exp_dir = pathlib.Path(eval_protocol_dir) / "experiment_results" exp_dir.mkdir(parents=True, exist_ok=True) # Create one JSONL file per experiment_id