Skip to content

feat: aggregator profiling harness (mock results + loading-pathway grid)#48

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/aggregator-profiling
Jul 16, 2026
Merged

feat: aggregator profiling harness (mock results + loading-pathway grid)#48
Jammy2211 merged 1 commit into
mainfrom
feature/aggregator-profiling

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

New aggregator profiling harness (PyAutoLabs/PyAutoFit#1375): fabricates mock search-output directories through the real DirectoryPaths machinery — no sampler runs, thousands of results in seconds — and times each aggregator loading pathway over a one-axis-at-a-time grid (number of results × samples per result × model size), so it is explicit which axis drives poor scaling.

Findings from the first baseline (recorded on the issue): values("samples") dominates and scales linearly with samples-per-result and model size; AggregateCSV scales with model complexity; the from_directory scan itself is cheap; and full-samples loading across 3000 × 1k-sample results OOMs (~6.6 GB RSS) because every SearchOutput caches its Samples (the profiler caps that stage at 500 results).

These tools produced the before/after numbers for the PyAutoFit speedups PR.

Upstream PR

Scripts Changed

  • scripts/profiling/__init__.py — new (package marker)
  • scripts/profiling/aggregator/__init__.py — new (package marker)
  • scripts/profiling/aggregator/mock_results.py — new: mock result-set generator (--n-results/--n-samples/--n-gaussians/--zip/--latent); template written via the library's own paths machinery, stamped N times via copytree; manifest-based regeneration skip
  • scripts/profiling/aggregator/profile_aggregator.py — new: grid runner timing from_directory, iteration, values("samples_summary"/"model"/"samples"), a metadata query, and an AggregateCSV catalogue build; prints a table and writes JSON under output/profiling_aggregator/results/; shrinks to a single tiny cell under PYAUTO_TEST_MODE so validation sweeps only smoke-check it
  • scripts/profiling/aggregator/README.md — new: one-paragraph usage

All outputs land under output/ (gitignored). Not added to smoke_tests.txt (profiling tools, not smoke tests).

Test Plan

  • PYAUTO_TEST_MODE=1 python scripts/profiling/aggregator/profile_aggregator.py — tiny cell completes in seconds (the run_all_scripts.sh path)
  • Real Aggregator loads the mock sets identically to real output (summary/samples/query spot-checks), including the --zip variant
  • Full before/after grids run to completion including the 3000-result cell

Generated by the PyAutoLabs agent workflow.

- mock_results.py: fabricate mock search-output directories via the
  real DirectoryPaths machinery (no sampler runs; thousands of results
  in seconds; optional zip/latent variants; manifest regen skip)
- profile_aggregator.py: time each loading pathway over a one-axis
  grid (n_results x n_samples x model size); table + JSON output;
  tiny single cell under PYAUTO_TEST_MODE for validation sweeps
- measured the before/after for PyAutoFit#1376; baseline findings
  (samples parse dominates; 3000x1k full-samples load OOMs) on #1375

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 16, 2026
@Jammy2211
Jammy2211 merged commit 05b0222 into main Jul 16, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/aggregator-profiling branch July 16, 2026 14:16
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