Skip to content

eval_healthbench: skip when --output already exists - #246

Merged
PeterLi-jpg merged 1 commit into
mainfrom
eval-healthbench-skip-on-existing
May 4, 2026
Merged

eval_healthbench: skip when --output already exists#246
PeterLi-jpg merged 1 commit into
mainfrom
eval-healthbench-skip-on-existing

Conversation

@PeterLi-jpg

Copy link
Copy Markdown
Owner

Summary

  • stage 4 of the pipeline runs 4 healthbench configs in sequence; the run_eval() wrapper in tpu/run_pipeline.sh already skips configs whose JSON exists, but the underlying eval_healthbench.py did not. direct invocations or future wrapper changes would re-do ~10-15 min of inference + grading.
  • now the script itself short-circuits when --output is already a non-empty file, right after args.output is expanded. empty (size 0) files are treated as partial writes from a crashed run and are allowed to be overwritten.
  • added tests/test_eval_healthbench_skip.py covering both the non-empty skip path (rc==0, mtime unchanged) and the empty-file no-skip path.

Test plan

  • python3 -m py_compile scripts/eval_healthbench.py
  • /tmp/preflight-py311/bin/python -m pytest tests/ -x -q — 187 passed, 1 skipped
  • /tmp/preflight-py311/bin/python -m pytest tests/test_eval_healthbench_skip.py -v — both new tests pass

stage 4 runs 4 healthbench configs in sequence; on resume after preempt
the wrapper short-circuits but a direct invocation would re-run a config
whose JSON already landed (~10-15 min wasted per config). bake the
idempotency check into the script so it protects direct invocations and
future wrapper changes. empty (size 0) files are still overwritten in
case a previous run crashed mid-write.
@PeterLi-jpg
PeterLi-jpg merged commit 44a4ab4 into main May 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant