Repository navigation
fix(slurm): let a CPU-only run's saved-answer re-judge queue and refresh its metrics - #6210
Conversation
…esh its metrics Signed-off-by: Daniel Egert <[email protected]>
|
/ok to test 608fec7 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM. No concerns found.
I reviewed all five changed files and traced the affected recovery paths, including accounting safeguards, older-reader compatibility and the settled-source metrics and health refresh.
This was a static review. I did not execute tests.
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.
|
/ok to test c409e07 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43991518627 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43991648720 |
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]>
What does this PR do?
Fixes the CPU-only branch of
SlurmExecutor.reverify_judge_failures(gym eval resubmit <job> <benchmark> --recoverwhen the decision isreverify). A run whose only open rows are judge failures could not be re-judged there, and once past that the re-judge left the run's score and health stale. The GPU branch (_queue_judge_job) is unchanged.Found while onboarding EQ-Bench 4 (step 7b judge fixture: a 3-row CPU-only run with an invalid judge key). The first inspect planned
reverifywith 3judge_recoverablerows, and--recoverstopped with:The three gaps, all on the CPU-only path
resume_scriptwrites.gym_infra_retrieson the first infra retry, so a chain that never retried has none. The recovery decision counts an absent file as 0 (recovery.py,_decide_from_collected:{"absent": 0, "ok": ...}.get(infra_retries_state)), but the dispatch read the rawinfra_retries_used, which isNone, and refused. It now maps the state the same way: absent is 0, malformed or unknown still refuses.NO_ELIGIBLE_RETRY_REASONto.gym_chain_incomplete. That is how every run whose only open rows are judge failures ends, so thechain_incompletecheck refused every such run. The collector now reportschain_ended_itself(the marker's first line is exactly that reason), and the dispatch accepts that one marker. Every other marker line (a continuation that ended before its guard, unknown accounting, a cancelled or refused follow-up, ...) still refuses, and the dispatch-time digest check of.gym_chain_incompleteis unchanged.--settle-receipt, which makescli/eval.py::_reverify_with_receiptcall_refresh_settled_sourceafter the settle pass. The CPU-only branch did not, sorollouts_aggregate_metrics.jsonandquality_summary.jsonkept their pre-re-judge contents. The final inspect then read every row as scored but the gate asFAILED("no requested metric was read"), with healthUNVERIFIED("quality summary is not bound to this run's sole rollouts.jsonl source"). The CPU-only command now passes--settle-receipt <reverification folder>/receipt.json, beside its output. The receipt is only read through the judge-job journal, which the CPU-only branch does not write, so nothing else reads it.Changes
nemo_gym/orchestration/executors/slurm.pyreverify_judge_failures: retry count frominfra_retries_state; acceptchain_ended_itself; pass--settle-receiptnemo_gym/orchestration/collect_evidence.pyNO_ELIGIBLE_RETRY_REASON; collectchain_ended_itselfnemo_gym/orchestration/recovery.pyCollectedEvidence.chain_ended_itself: bool = Falsetests/unit_tests/orchestration/test_slurm_rejudge.pyfirst_allocation(no retry file, self-ended marker: queues) andincomplete(another marker: refuses); the queued command carries the receipt beside its outputtests/unit_tests/orchestration/test_eval_resubmit_decision.pychain_ended_itselfonly for that marker lineA pinned remote Store reader older than this change lacks the new field; the executor already takes every field missing from the reader's projection from the host collection, so the value is the host's either way.
Validation
Linux (WSL2, Python 3.13.14), on
origin/main:pytest tests/unit_tests/orchestration/test_slurm_rejudge.py tests/unit_tests/orchestration/test_collect_evidence_module.py tests/unit_tests/orchestration/test_eval_resubmit_decision.py::test_the_collector_names_a_chain_that_ended_itselffirst_allocation, the receipt assertion inok/large, all 4 collector cases)pytest -n 8 tests/unit_tests/orchestration tests/unit_tests/eval tests/unit_tests/clitest_eval_resubmit.py::test_a_resubmitted_job_normalizes_resume_before_exporters_open,::test_resubmit_normalizes_an_older_saved_job_script) fail identically without this change:ModuleNotFoundError: No module named 'mlflow'in this environmentpre-commit run --files <changed files>On the cluster: with the first two gaps worked around by correcting only those two evidence fields before Gym's own dispatch, the judge fixture's re-judge queued and settled all 3 rows from the saved answers, with no policy calls. Its final inspect showed the third gap (gate
FAILED, healthUNVERIFIED), which this PR also fixes.Compatibility
CollectedEvidencegains one optional field with a default, so evidence from an older collector still validates.Checklist
pre-commit run --all-files) (so CI lint/format checks pass). (Passes on all changed files;--all-filesnot run.)git commit -s) (so the DCO check passes).