Skip to content

pipeline_resume tier: SLaM 5-stage resume-overhead profiler + instant test-mode recipe (#70)#75

Merged
Jammy2211 merged 5 commits into
mainfrom
feature/slam-resume-profiling
Jul 17, 2026
Merged

pipeline_resume tier: SLaM 5-stage resume-overhead profiler + instant test-mode recipe (#70)#75
Jammy2211 merged 5 commits into
mainfrom
feature/slam-resume-profiling

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

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 from slam_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 via PYAUTO_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_from 70s + 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 as draft/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 (.completed markers), span timers, resume-path decomposition wrappers, test-mode support (output/test_mode/ namespacing, _testmode artifact suffix), and a runtime stopgap writing paths.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 sentinel
  • scripts/build_readme.pypipeline-resume renderer + target README registration
  • config/general.yaml — new: workspace parity (disable_positions_lh_inversion_check — the chain previously crashed at source_pix[2]), keep check_likelihood_function (a real resume cost), silence the main-branch version warning
  • README.md / results/README.md — section-index rows
  • results/pipeline_resume/slam_resume_summary_hst_v2026.7.9.1_testmode.{json,png} — cold + resume records and the comparison figure

Test Plan

  • Instant cold chain completes end-to-end (205s) and the rerun takes the completed-fit path (148s, mode: resume)
  • ruff check . clean; scripts/build_readme.py --check clean

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

Jammy2211 and others added 5 commits July 16, 2026 11:28
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>
@Jammy2211 Jammy2211 added the pending-release Queued for the next release label Jul 17, 2026
@Jammy2211
Jammy2211 merged commit 053714a into main Jul 17, 2026
1 check failed
@Jammy2211
Jammy2211 deleted the feature/slam-resume-profiling branch July 17, 2026 07:44
@Jammy2211 Jammy2211 removed the pending-release Queued for the next release label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant