Repository navigation
fix: retain samples in the database guide's capped fits - #465
Merged
Merged
Conversation
scripts/guides/results/database/start_here.py indexes sample 9 of the two Nautilus fits it runs itself, but those fits are capped at n_like_max=300 and the config/output.yaml samples_weight_threshold of 1e-10 prunes samples.csv to a single row, so the index raised IndexError under the release profile. Disable the threshold before the fits, as _quick_fit.py already does for the other results guides, with a prose section explaining that the cap is what makes the pruning bite. The smoke profile sets PYAUTO_SKIP_CHECKS=1, which disables the threshold outright, so smoke cannot reproduce this failure class. Closes #464 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 task
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 #464.
scripts/guides/results/database/start_here.pyfails withIndexError: list index out of rangeat line 358 (samples.parameter_lists[9][2]) in PyAutoHeart's release-integrate leg — run 30880450685, jobintegrate / run_scripts (3.12, autolens, guides), FAIL at 129.9s.Cause
The script runs its own two Nautilus fits capped at
n_like_max=300, then indexes sample 9.PyAutoFit/autofit/non_linear/samples/samples.py:398appliesconfig/output.yaml'ssamples_weight_threshold: 1.0e-10when writingsamples.csv, and a 300-evaluation nested-sampling run is so weight-peaked that only one sample clears it.This is the same family as #274 / PyAutoFit#275 (release-validation cluster E). That fix consolidated the other
guides/resultstutorials onto_quick_fit.py, which sets the threshold toNoneat line 57 for exactly this reason — but this script was left out, because it must build a database from its own output folder over two differently-named datasets, which is the tutorial's subject.Not a regression
e41b0fceadded the auto-simulate guard to this script and removed itsNEEDS_FIXentry fromconfig/build/no_run.yaml. Yesterday's release run executed 41 scripts in the guides shard; today's executed 42. The script ran for the first time and hit a pre-existing defect.The fix
conf.instance["output"]["samples_weight_threshold"] = Nonebefore the fit loop, with a short prose section explaining that the 300-evaluation cap is what makes the pruning bite and that a full-length fit does not need the line. Line 358 is unchanged — indexed sample access is the tutorial's subject, and the sibling results guides (aggregator/samples.py:200,aggregator/samples_via_aggregator.py:146) index[9]identically.profile_smoke.yamlsetsPYAUTO_SKIP_CHECKS=1, andsamples.py:402reads that asif skip_checks(): weight_threshold = None— the smoke profile disables the very threshold that causes the failure. A green smoke run on this PR is not evidence. The real gate is PyAutoHeart's release-integrate leg.PYAUTO_SKIP_CHECKSsamples.csv10Evidence — control vs patched, both under
profile_release.yamlRun via
autohands.env_config.build_env_for_scriptagainstconfig/build/profile_release.yaml, from a clean slate deletingoutput/database/,output/database.sqliteandoutput/database.info.Control (unchanged script,
main):Patched (this branch):
The control reproduces the CI traceback line-for-line.
Scripts Changed
scripts/guides/results/database/start_here.py— importconf, disablesamples_weight_thresholdbefore the fit loop, and add a__Sample Retention__prose section explaining whyNo
pending-releaselabel: this is workspace-only and depends on no unreleased library API, so there is no library-first merge gate (same as #461, #463 and #450).Note for anyone reproducing this
output/database.sqlitesits besideoutput/database/, sorm -rf output/databasedoes not clear it and the aggregator silently reads the previous run's entries. That produced a false pass during diagnosis. A clean slate must delete the directory, the.sqliteand the.info.Notebooks regenerated.
🤖 Generated with Claude Code