Repository navigation
Revert "feat(v1)!: move run info from trace to episode" #2264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| from verifiers.v1.cli.eval import resume | ||
| from verifiers.v1.cli.output import ( | ||
| append_episode, | ||
| append_trace, | ||
| output_path, | ||
| save_config, | ||
| ) | ||
|
|
@@ -76,7 +77,8 @@ async def run_eval(env: Env, config: EvalConfig) -> list[Episode]: | |
| write_lock = asyncio.Lock() | ||
|
|
||
| async def on_complete(episode: Episode) -> None: | ||
| episode.record_run(EvalRunInfo(id=config.uuid)) | ||
| for trace in episode.traces: | ||
| trace.record_run(EvalRunInfo(id=config.uuid)) | ||
| await append_episode(out, episode, write_lock) | ||
|
|
||
| # Serving resources (shared tool servers, interception) come up once for the | ||
|
|
@@ -256,10 +258,9 @@ async def run_group_unit(idx: int) -> list[Episode]: | |
| ) | ||
| records = [] | ||
| for trace in traces: | ||
| record = Episode.of(trace, env=config.env_id) | ||
| record.record_run(EvalRunInfo(id=config.uuid)) | ||
| await append_episode(out, record, write_lock) | ||
| records.append(record) | ||
| trace.record_run(EvalRunInfo(id=config.uuid)) | ||
| await append_trace(out, trace, write_lock, env=config.env_id) | ||
| records.append(Episode.of(trace)) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Returned episodes diverge from persisted recordsMedium Severity
Reviewed by Cursor Bugbot for commit eaab120. Configure here. |
||
| return records | ||
|
|
||
| async def run_unit(payload: dict) -> list[Episode]: | ||
|
|
@@ -270,7 +271,8 @@ async def run_unit(payload: dict) -> list[Episode]: | |
| sampling=config.sampling, | ||
| **payload, | ||
| ) | ||
| episode.record_run(EvalRunInfo(id=config.uuid)) | ||
| for trace in episode.traces: | ||
| trace.record_run(EvalRunInfo(id=config.uuid)) | ||
| await append_episode(out, episode, write_lock) | ||
| return [episode] | ||
|
|
||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium
eval/runner.py:263In
run_group_unit, each trace is persisted withappend_trace(..., env=config.env_id), but the in-memory episode returned to callers is built viaEpisode.of(trace)without passingenv. As a result, every group-scored legacy result returned byrun_eval_serverhas an emptyepisode.env.id, even though the same episode on disk carries the configured environment ID. The previous code constructedEpisode.of(trace, env=config.env_id), so this change silently drops the env metadata from in-memory results. Passenv=config.env_idtoEpisode.ofto preserve the in-memory episode's environment identity.🚀 Reply "fix it for me" or copy this AI Prompt for your agent: