feat: aggregate_images + aggregate_fits profiling stages#51
Merged
Conversation
- 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>
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
Adds the last uncovered catalogue-workflow legs to the aggregator profiling harness:
aggregate_images(png_make pattern,AggregateImages.output_to_folder) andaggregate_fits(fits_make pattern,AggregateFITS.output_to_folder) stages, with mock templates upgraded to carry the payloads they consume — a panelledsubplot_fit.png(4×3 grid) and a multi-HDUfit.fits(4 ImageHDUs with the standard EXTNAMEs).These stages exposed the
AggregateFITSfile-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
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.py—SubplotFit/FITSFitenums +aggregate_imagesandaggregate_fitsstagesTest Plan
PYAUTO_TEST_MODE=1tiny cell passes with both new stagespngfits_beforeJSON)Generated by the PyAutoLabs agent workflow.