Repository navigation
fix(eval): recover a run whose coverage report predates allocation_id - #6223
Conversation
A coverage report written by a worker older than the allocation_id field names no writer, so recovery could not prove that the allocation holding the in-flight reservations had ended. It stopped instead, and the run could never be continued: the rollouts already graded stayed stranded. Such a report still has its writer in the job chain, because the prologue records each allocation there before the Store opens. When the report records no allocation at all, every allocation of the chain must have ended for the cut to hold. A report that records allocation_id as null is a writer outside the scheduler and stays unknown, as before. collect_evidence reports the distinction as coverage_writer_unrecorded, so a missing key and an explicit null are no longer conflated. Signed-off-by: Wojciech Prazuch <[email protected]>
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM, no concerns found.
I inspected all four changed files and traced the new evidence flag through Store selection and scheduler-backed recovery. The fallback requires terminal accounting for every recorded chain allocation; explicit null still keeps the writer unknown. The new regression cases check successful recovery and missing accounting records.
Static review only. I could not execute tests in this read-only environment.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
AdamRajfer
left a comment
There was a problem hiding this comment.
🤖 Adam’s AI assistant, reviewing on Adam's behalf.
The fix is right and conservative: a missing key resumes only once every chain allocation has a terminal record, and an explicit null or a missing record still stops. I ran the touched suite on this head and it passes. Undoing the collect_evidence change, and separately the slurm.py call site, makes the inspect test fail both times, so it catches the bug.
Two asks before merge:
- Could you run
gym eval resubmit --recover --inspecton the stranded 423/600 run with this head and post the decision line here? - The in-job guard (
_store_writer_ended) still treats an unnamed writer as unknown, so a mixed-version chain stops at the follow-up and needs a manual--recover. Fine to leave, but please say so in the PR body.
Happy to look again once unit CI is green.
|
/ok to test 552a93a |
AdamRajfer
left a comment
There was a problem hiding this comment.
🤖 Adam’s AI assistant, approving on Adam's behalf. Unit CI is green. Please still post the --recover --inspect line and the note on mixed-version chains before merging.
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43896496693 |
|
Ran Decision line, verbatim: Action Before the fix, the same command on the same run decided STOP: 423 scored, 17 retryable, 64 unknown ( On the mixed-version caveat: this chain is not mixed. Both jobs ran the same pre- |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43902543730 |
Ports main's changes to the files this PR moved: - orchestration/recovery.py (#6210, #6080, #6223): 3 symbols changed and 6 added, into the eval/recovery modules; NO_ELIGIBLE_RETRY_REASON moves to eval/recovery/markers.py because the evidence reader now uses it. - executors/slurm.py (#6210, #6223, #6215): the 12 hunks, into executors/slurm/chain.py, judge_job.py and reader.py. - tests that import the old module paths (the otel, resubmit and recovery tests added since). Signed-off-by: Tomasz Grzegorzek <[email protected]>
A coverage report written by a worker older than the
allocation_idfield names no writer. Recovery could not prove that the allocation holding the in-flight reservations had ended, so it stopped. The run could then never be continued, and the rollouts already graded stayed stranded.We hit this on a 600-rollout run that stopped after its first segment with 423 rollouts graded. There is currently no way to resume it.
What changes
allocation_idstill has its writer in the job chain, because the prologue records each allocation there before the Store opens. In that case the cut holds only when every allocation of the chain has ended.allocation_idasnullmeans a writer outside the scheduler, and stays unknown exactly as before.collect_evidencenow reports which of the two it saw, ascoverage_writer_unrecorded, so a missing key and an explicit null are no longer conflated.Verified
test_allocation_cut_recovery.pycover both directions: reservations resume when the coverage names no writer and the chain ended, and they stay unknown when a chain record is missing.openaiolder than the tree expects, so collection fails before any test runs. CI here is the check.Known limitation: mixed-version chains
The in-job guard (
_store_writer_ended) still treats an unnamed writer as unknown. So a chain that mixes workers from before and afterallocation_idstops at the follow-up and needs a manualgym eval resubmit --recoverto continue. This change deliberately does not alter the in-job path: that guard runs without scheduler accounting, so it cannot make the same determination safely.