pipeline_resume tier: SLaM 5-stage resume-overhead profiler + instant test-mode recipe (#70)#75
Merged
Merged
Conversation
New pipeline_resume/slam_resume.py runs the full 5-stage SLaM chain (mirrored from autolens_workspace slam_start_here.py) cold, then re-runs it to profile per-stage resume overhead: completed-fit loading (samples summary / full samples via runtime wrappers, no library edits), adapt-image reconstruction, position likelihoods and model composition. Versioned JSON+PNG summaries land under results/pipeline_resume/; build_readme.py gains the pipeline-resume auto-table. n_batch mirrors slam_start_here.py (50/20) — the Nautilus default of 100 OOMs a 16GB machine on the source_lp MGE model. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fast-tier n_batch drops to 4 (not an identifier field, so completed stages survive the change; batch 10 OOMs when the machine is contended). Run mode is now derived from per-stage .completed markers — a rerun over a partly complete chain records mode=partial and is excluded from cold-vs-resume comparisons. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mode/reset detection follows the output/test_mode/ namespacing via autoconf's with_test_mode_segment, and test-mode runs write to a _testmode-suffixed artifact with the level recorded per run, so instant test-mode chains never mix with real measurement records. Prep for profiling via PYAUTO_TEST_MODE_SAMPLES (PyAutoFit#1378/#1379). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…workspace Instant cold chain via PYAUTO_TEST_MODE=2 + PYAUTO_TEST_MODE_SAMPLES=10000 (205s cold / 148s resume, size parity 10,000x21 rows 8.81MB vs the 10,187x21 9.07MB production target). README gains the recipe, the env-var trap, the known deltas, and the reference decomposition: resume overhead is dominated by positions_likelihood_from (70s) + adapt-image reconstruction (55s), with full samples load at 0.5s. config/general.yaml (new): disable_positions_lh_inversion_check for workspace parity (slam source_pix[2]/light/mass compose pixelizations without positions, as the guide does), keep check_likelihood_function true (a real resume cost), silence the main-branch version-check warning. Harness carries a runtime patch writing paths.completed() after the test-mode bypass — PyAutoFit returns without it, so bypassed stages were never resumable (bug filed: draft/bug/autofit). Co-Authored-By: Claude Fable 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.
Summary
New
pipeline_resume/profiling tier answering autolens_profiling#70: how much does resuming a SLaM pipeline cost, and where does the time go? Runs the full 5-stage chain (mirrored fromslam_start_here.py) cold, then re-profiles the resume with per-stage and per-component decomposition (completed-fit loads via runtime wrappers — no library edits). Includes the instant cold path viaPYAUTO_TEST_MODE=2 PYAUTO_TEST_MODE_SAMPLES=10000(test-mode epic phase 3, folded into #70) with size-parity validation (10,000×21 rows / 8.81 MB vs the 10,187×21 / 9.07 MB production target).Headline: resume of a fully-complete chain = 148s pure overhead, 85% of it inter-stage recomputation (
positions_likelihood_from70s + adapt-image rebuild 55s); full samples CSV load is 0.5s. Judgment (on #70): targeted load-not-recompute fixes, no checkpoint system — follow-up filed asdraft/feature/autogalaxy/slam_resume_fast_path_load_persisted_adapt.md.Scripts Changed
pipeline_resume/slam_resume.py— new: 5-stage SLaM chain with cold/partial/resume mode detection (.completedmarkers), span timers, resume-path decomposition wrappers, test-mode support (output/test_mode/namespacing,_testmodeartifact suffix), and a runtime stopgap writingpaths.completed()after the test-mode bypass (PyAutoFit gap, bug prompt filed)pipeline_resume/README.md— new: tier doc, instant test-mode recipe (same-env-vars trap, known deltas), reference decomposition, auto-table sentinelscripts/build_readme.py—pipeline-resumerenderer + target README registrationconfig/general.yaml— new: workspace parity (disable_positions_lh_inversion_check— the chain previously crashed atsource_pix[2]), keepcheck_likelihood_function(a real resume cost), silence the main-branch version warningREADME.md/results/README.md— section-index rowsresults/pipeline_resume/slam_resume_summary_hst_v2026.7.9.1_testmode.{json,png}— cold + resume records and the comparison figureTest Plan
mode: resume)ruff check .clean;scripts/build_readme.py --checkcleanGenerated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code