Skip to content

feat: aggregate_images + aggregate_fits profiling stages#51

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/aggregate-images-fits
Jul 17, 2026
Merged

feat: aggregate_images + aggregate_fits profiling stages#51
Jammy2211 merged 1 commit into
mainfrom
feature/aggregate-images-fits

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds the last uncovered catalogue-workflow legs to the aggregator profiling harness: aggregate_images (png_make pattern, AggregateImages.output_to_folder) and aggregate_fits (fits_make pattern, AggregateFITS.output_to_folder) stages, with mock templates upgraded to carry the payloads they consume — a panelled subplot_fit.png (4×3 grid) and a multi-HDU fit.fits (4 ImageHDUs with the standard EXTNAMEs).

These stages exposed the AggregateFITS file-handle leak (2 fds/result; crash at ~500 results at default ulimit) fixed in the PyAutoFit PR — merge that first.

Baseline (quiet machine, quick grid, per-result): aggregate_images ~1.5 ms (already caches per result — profiled clean), aggregate_fits ~5–7 ms at 2 HDUs (19% faster after the single-open fix, interleaved A/B).

Upstream PR

  • PyAutoFit AggregateFITS fd-leak fix — merge first.

Scripts Changed

  • scripts/profiling/aggregator/mock_results.py_write_image_and_fits_payloads: panelled subplot png + multi-HDU fits in each template (replaces the 64×64 stubs)
  • scripts/profiling/aggregator/profile_aggregator.pySubplotFit/FITSFit enums + aggregate_images and aggregate_fits stages

Test Plan

  • PYAUTO_TEST_MODE=1 tiny cell passes with both new stages
  • Quick-grid baseline recorded (pngfits_before JSON)
  • fd-leak reproduction + post-fix zero-leak verification at 100 results

Generated by the PyAutoLabs agent workflow.

- mock templates carry the workflow payloads: panelled subplot_fit.png
  (4x3 grid) + multi-HDU fit.fits (4 EXTNAMEs)
- profile_aggregator.py: SubplotFit/FITSFit enums + png_make and
  fits_make pattern stages

These stages exposed the AggregateFITS fd leak fixed in Fit#1386.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 17, 2026
@Jammy2211
Jammy2211 merged commit 23959fc into main Jul 17, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/aggregate-images-fits branch July 17, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant