Repository navigation
Description
Overview
Release-profile validation exposed seven scripts whose result discovery or generated-output contracts depend on state from earlier runs. Reproduce them from clean output trees, distinguish PyAutoFit regressions from script assumptions, and make every script’s prerequisites explicit and reliable.
Plan
- Reproduce all seven scripts in release CI order and independently.
- Classify failures by aggregator discovery, sample assumptions, or output paths.
- Fix PyAutoFit when valid completed searches are undiscoverable.
- Otherwise update workspace scripts minimally, preserving tutorial narrative.
- Add focused tests and rerun the seven-script release surface.
Detailed implementation plan
Affected Repositories
- PyAutoFit (primary)
- autogalaxy_workspace
- autolens_workspace
- autolens_workspace_test
Work Classification
Both — library investigation first, followed by workspace changes where required.
Branch Survey
| Repository | Branch | State |
|---|---|---|
| PyAutoFit | main | clean |
| autogalaxy_workspace | main | generated datasets modified |
| autolens_workspace | main | generated datasets modified |
| autolens_workspace_test | main | datasets modified; notebooks deleted |
No registered worktree conflict exists. Adjacent work is present on feature/latent-jax-release-failures.
Suggested branch: feature/aggregator-output-contracts
Worktree root: ~/Code/PyAutoLabs-wt/aggregator-output-contracts/
Implementation Steps
- Create an isolated worktree and reproduce each parent directory from a clean output tree using its release profile.
- Rerun each target script independently and document required predecessor outputs.
- Inspect
PyAutoFit/autofit/aggregator/and database scraping when completed searches are absent. - Add focused PyAutoFit regression tests only where valid output is incorrectly excluded.
- Correct invalid result-count assumptions and create generated-output directories within the responsible workspace scripts.
- Preserve user-facing prose and regenerate notebooks for modified tutorial scripts.
- Run focused unit tests, script-size guards, and all seven release-profile scripts.
- Ship library changes before dependent workspace changes.
Key Files
PyAutoFit/autofit/aggregator/aggregator.pyPyAutoFit/autofit/aggregator/search_output.pyPyAutoFit/autofit/database/aggregator/scrape.pyautogalaxy_workspace/scripts/guides/results/start_here.pyautogalaxy_workspace/scripts/guides/results/aggregator/samples_via_aggregator.pyautolens_workspace/scripts/guides/results/start_here.pyautolens_workspace/scripts/guides/results/aggregator/galaxies_fits.pyautolens_workspace/scripts/guides/results/aggregator/samples_via_aggregator.pyautolens_workspace/scripts/guides/results/workflow/csv_make.pyautolens_workspace_test/scripts/imaging/convolution.py
Original Prompt
Click to expand starting prompt
Fix release aggregator and generated-output contracts
Context
Seven release failures involve results that are absent, shorter than examples assume,
or written to a different location. Several pass in a stateful local checkout, so the
first task is a clean, directory-ordered reproduction. Primary owners are @PyAutoFit,
@autogalaxy_workspace, @autolens_workspace, and @autolens_workspace_test.
Scripts
autogalaxy_workspace/scripts/guides/results/start_here.pyautogalaxy_workspace/scripts/guides/results/aggregator/samples_via_aggregator.pyautolens_workspace/scripts/guides/results/start_here.pyautolens_workspace/scripts/guides/results/aggregator/galaxies_fits.pyautolens_workspace/scripts/guides/results/aggregator/samples_via_aggregator.pyautolens_workspace/scripts/guides/results/workflow/csv_make.pyautolens_workspace_test/scripts/imaging/convolution.py
Required work
- Run each parent directory in CI order from a clean output tree under the release
profile, then rerun each script independently to document prerequisites. - Determine whether failures are library output/aggregator regressions, invalid script
assumptions about sample counts, or missing directory creation for generated files. - Fix PyAutoFit when valid completed searches are not discoverable. Otherwise update
scripts minimally while preserving their teaching narrative. - Ensure scripts create their own output directories and do not depend on unrelated
earlier legs or developer-local artifacts. - Add the narrowest appropriate tests and rerun all seven release-profile scripts.
Activity
Jammy2211 commentedon Jul 6, 2026
Library PR Created
PYAUTO_TEST_MODE=0now uses the normal output tree; active test levels remain namespaced underoutput/test_mode/.Next: ship the release-profile and generated-output fixes in the affected workspaces.
Jammy2211 commentedon Jul 6, 2026
Smoke Test Results — 2026-07-06
All 32 smoke tests passed. The seven release-profile target scripts also pass independently from clean generated-output trees.
Workspace PRs:
Jammy2211 commentedon Jul 7, 2026
Update: PyAutoFit PR #1326 was closed as unnecessary for this fix. The workspace release profiles now unset PYAUTO_TEST_MODE for guides/results instead of setting PYAUTO_TEST_MODE=0. The remaining fix is in the workspace PRs, primarily retaining the 300 quick-fit samples and keeping results guides out of PyAuto test mode.
Jammy2211 commentedon Jul 7, 2026
Follow-up pushed to the workspace PRs: the results workflow examples now reuse scripts/guides/results/_quick_fit.py instead of maintaining their own two-fit setup. The helper now creates two fits in output/results_folder, includes the latent outputs needed by csv_make.py, and disables fast-plot skipping so png_make.py / fits_make.py have fit.png and fit.fits available. The workflow examples now use results_folder instead of results_folder_csv_png_fits.
Jammy2211 commentedon Jul 7, 2026
Follow-up correction: removed workspace-side test-mode path handling from the results scripts. The workspace examples now use plain output/results_folder paths; the release/smoke env config is responsible for running these guides outside PYAUTO_TEST_MODE. PyAutoFit remains the owner of test-mode output routing when test mode is actually enabled.
Jammy2211 commentedon Jul 7, 2026
Merged the workspace fixes for the aggregator output contracts.
PRs merged:
Fix summary:
_quick_fit.pyso the examples share one setup path._quick_fit.pynow generates two release-mode fits inoutput/results_folder, keeps the full Nautilus sample output, writes the required CSV/PNG/FITS artefacts, and includes the latent summaries used by the aggregator examples.output/results_folder.PYAUTO_TEST_MODEfor the results guides, so these examples generate realn_like_max=300Nautilus outputs instead of one-sample test-mode outputs.Fresh smoke after clearing
outputpassed: