Repository navigation
fix(recovery): key the operator continuation on the accounting cause; keep artifact file modes - #5594
Conversation
… keep artifact file modes Two follow-ups from the review of #5343. An operator continuation of a run whose chain accounting is unknown keyed on the decision's display reason being exactly the unknown-budget or unknown-walltime text. A run that also holds a masked result without a gradeable artifact gets a note appended to that reason, so the comparison failed and the explicit budget stopped instead of continuing. The decision now records which accounting is unknown in its own field, excluded from the serialized output, and the continuation keys on that field. A regression test covers a scored, a masked-without-artifact and a missing row with unreadable retry accounting and an explicit budget: the run continues, the masked row stays retained and the missing one resumes. The run-health rewrite of the aggregate metrics and quality summary replaced each file with a NamedTemporaryFile, which is created 0600, so readable artifacts became owner-only. The replacement now carries the existing file's mode, or the default mode under the process umask for a new file. A test checks both files keep 0664 and 0640. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
|
/ok to test b3da737 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM — no concerns found.
I reviewed all four changed files and traced the recovery safety guards, decision serialization, and health-export callers. The regression tests cover the decorated accounting-stop reason, retained saved rows, and artifact mode preservation.
Static review only; I didn't 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.
The mode fix toggled the process umask to compute the default mode of a new file. Write through rollout_recovery.atomic_output_file instead: it creates the temporary file exclusively under the caller's umask and keeps an existing file's mode, with no process-wide change, so there is one way to do this. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
|
/ok to test fcc877f |
giuliolovisotto
left a comment
There was a problem hiding this comment.
Both findings from the #5343 review are addressed. Replayed the original reproductions: the masked-row case now honors the explicit operator budget, and rewriting the aggregate and quality summary preserves their existing file modes.
Validation: 150 tests passed across the recovery and export suites. test_a_job_the_scheduler_refuses_leaves_no_approval fails identically on the unchanged base, so it is not introduced here. Independent review found no blocker. LGTM.
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41858575148 |
Brings in the recovery accounting fix (#5594) and the managed-environment locks (#4837). Resolutions: - The planner split is regenerated from the merged planner with the same mechanical split. The only change to the split modules is #5594's: RecoveryDecision.accounting_unknown, set on the two unknown-accounting stops, and the operator continuation keying on it instead of on the reason text. - import-linter layers: main's new orchestration layer entry (the two locked-environment CLI modules) keeps its place, and the recovery layer stays below it. - The test #5594 added imports OperatorBudget from its new module. - The old module path keeps serving the two unknown-accounting reasons, which the planner no longer imports. Signed-off-by: Adam Rajfer <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ealth No conflicts; git merged every file on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
…ez/2135-judge-recovery No conflicts; git merged every file on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
…fer/deadline-evidence-on-3879 No conflicts; git merged every file on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
Two follow-ups from the review of #5343.
Operator continuation keyed on display text
_decide_from_collecteddecided whether an explicit operator budget may continue a run with unknown chain accounting by comparingdecision.reasonwith the unknown-budget and unknown-walltime reason strings.decide_recoveryappends a note to the reason when the run holds masked results without a gradeable artifact, and--rerun-masked-without-artifactand--extend-attemptsappend their own notes. With any of them the comparison failed, so a run that should continue under the explicit budget stopped instead.RecoveryDecisionnow records which accounting is unknown (accounting_unknown:"budget"or"walltime"), set where those two stops are decided and excluded from the serialized decision, so--inspectoutput does not change. The continuation keys on that field. The reason text is unchanged.Regression test: a scored row, a masked row without a gradeable artifact and a missing row, with unreadable retry accounting and an explicit budget. Before: STOP ("the budget is unknown; 1 masked result(s) without a gradeable artifact…"). After: RESUBMIT under the operator continuation; the masked row stays masked and retained, the missing row resumes, and the saved rows are untouched.
Artifact file modes after the run-health rewrite
_prepare_run_health_metricsrewritesrollouts_aggregate_metrics.jsonandquality_summary.jsonthrough aNamedTemporaryFile, which is created0600, so files that were group-readable became owner-only. The replacement now gets the existing file's mode, or0666under the process umask for a new file. Test: both files keep0664and0640after the rewrite.Validation
🤖 Generated with Claude Code