Repository navigation
Fail the job when an evaluation produces no result - #119
Merged
Merged
Conversation
Each evaluation's exit status was ignored, so a container that fails to start, a missing venv or a crashed harness all printed "Evaluation finished" and left the array element COMPLETED with no result file. The loss only surfaced later, as a gap in `collect --check`. Record each harness's exit status and whether it wrote anything, count the failures and exit non-zero. The read loop is redirected rather than piped so the counter survives past `done`, and the evalchemy branch's `cd` is scoped to a subshell now that the loop body runs in the current shell. Also exit non-zero when sbatch rejects the submission, instead of logging an error and returning normally.
geoalgo
approved these changes
Sep 22, 2026
gdols
added a commit
to gdols/oellm-eval
that referenced
this pull request
Sep 22, 2026
Resolves the template.sbatch conflict with OpenEuroLLM#119. The batching awk program moves into BATCH_ROWS_AWK and now runs inside the loop's process substitution, so the loop keeps running in the current shell and FAILED_EVALS survives it. A batched lm_eval call covers every task in its list, so when it fails it now adds one failure per task instead of one per call. Without that, test_failure_count_survives_the_read_loop reports "1 failed evaluation", since its two rows share a model and get batched into a single call.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The job script ignores the exit status of every evaluation it runs, so anything that goes wrong inside an array element still ends with
Evaluation finishedand a zero exit code. The element shows up asCOMPLETED 0:0with no result file, and the loss only surfaces later as a gap incollect --check.I hit three variants of this on LUMI while testing the README quickstart, all of which looked like successful runs:
The last one cost one of four evaluations in a run I would otherwise have recorded as complete.
The change
Each branch records the harness exit status and where it was told to write. An evaluation counts as done only if the harness exited 0 and produced a file — a container that fails to start and a missing venv both exit 0 while writing nothing, so the status alone is not enough. Failures are counted and become the job's exit status:
Two knock-on changes:
done.cdis now in a subshell. It relied on the loop being a subshell to contain it, which is no longer true.--output_pathfor lm_eval is now built from a variable so the result check can look for the file it actually writes (lm_eval appends its own timestamp).Also
raise SystemExit(1)when sbatch rejects the submission — it currently logs an error and returns normally, so a scheduling loop cannot tell the submission failed.Tests
tests/test_job_failure_reporting.pyrenders a real script throughschedule_evalsand runs it against a stub harness onPATH, so it exercises the template rather than a copy of its logic:Four of the five fail on
main; the happy-path one passes before and after. Rest of the suite passes (122, excluding the HuggingFace-backed ones),ruff checkandruff formatclean.Overlap
#107 makes the same loop change for the same reason. That branch is a much larger merge, so this is the standalone version; happy to close it if #107 is landing soon.