Repository navigation
fix: results index skips campaign task records; batch wait loop keeps the fit's exit status - #1750
Merged
Merged
Conversation
… the fit's exit status - autofit.results index walked into output/.campaign_tasks/, so the pending/failed task records a campaign's stage entry writes before its fit starts showed up as phantom results. The directory is skipped (the campaign collector walks for them itself). - The generated Slurm batch script's 'until wait' loop kept the 138 from a USR1-interrupted wait, so a fit that checkpointed on the pre-timeout signal and then finished cleanly exited 138. It now keeps only the fit's own status. The new test drives a real USR1 and fails on the old loop. Fixes #1749. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… kills on timeout (review nit) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #1749. This is a follow-up to hpc-campaign phase 5a, from the independent review of autolens_assistant#174.
What changes
autofit/results/index.py.find_resultsno longer walks into.campaign_tasks/. A campaign's stage entry writes pending or failed task records there before the fit starts, and the results index was counting them as phantom results. The campaign collector walks for those records on its own, so it is unaffected.autofit/campaign/scheduler/slurm.py. The generated batch script's wait loop now keeps only the fit's own exit status. Before, a fit that checkpointed on the pre-timeout USR1 and then finished cleanly exited 138, so it was recorded as a failure.API Changes
None.
CAMPAIGN_TASKS_DIRNAMEis a new module constant inautofit.results.index; it is not exported.Tests
Review
Independent review (a different model from the author's): CLEAN. The slurm tests ran 10× with no flakes. Its one test nit (fail fast if the fit never starts, kill on timeout) is applied.
Under the Heart RED development override, extended by the human on 2026-10-31; the reasons are quoted on #1749. Merge only with green CI and your /prm; no release.
🤖 Generated with Claude Code