mind: retire defer-scipy-sparse-import — shipped as PyAutoArray#477 - #324
Merged
Conversation
Picked off the dashboard with `/start_dev`; the work was already merged. PyAutoArray#477 (`91d8b97`, merged `6bbde1a` from `claude/defer-scipy-sparse-import`) landed it on 2026-08-22: `import autoarray` 464.4 ms -> 183.7 ms, a 281 ms saving. Verified against `PyAutoArray@main` — no module-scope `scipy.sparse` or `scipy.spatial` import survives anywhere in `autoarray/`; every reference is function-local. The implementation wrote its own correction back into the prompt the day it shipped (79d057c) but left the file in `draft/` with `Status: in-flight`. The 2026-08-24 reconciliation sweep (06d76db) touched it to repoint a cross-reference and passed over it — `in-flight` reads as live work, not shipped work — so it kept rendering as pickable backlog. This is the record it should have got. The record keeps what the task actually taught, since the prompt's premise was wrong in the same way its pynufft predecessor's was: `scipy.sparse` was never imported from `derivative_util.py`. `scipy.spatial` (134 ms) pulls it (154 ms) in transitively, so deferring `csr_matrix` alone achieved nothing and both had to go. A module's `importtime` *cumulative* figure is not its *exclusive* cost. Also recorded: the prompt's multiprocessing warning did not apply (every use site is inside a function, so a plain local import suffices — `_load_nufftax` needed its module-level cache only because unpickled Pool workers never re-run `__init__`), and `delaunay.py` had been left half-deferred, which bought zero because the surviving module-scope import kept the subtree on the path. Cross-references in `remove-pynufft-legacy-transformer` and `pynufft_removal_downstream_residue` repointed at the new record, and their stale "~0.10 s" figure corrected to the measured 281 ms. Backlog 140 -> 139. `lifecycle.py check`, `orphans` and `index --check` all OK; dashboard regenerated. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WuqYkCFVVpaSxfq7GsMY8v
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.
Picked
draft/maintenance/libraries/defer_scipy_sparse_import.mdoff the dashboard with/start_dev. The work was already merged, so no development happened — this is the completion record it should have got on 2026-08-22.Evidence it shipped
91d8b97"Defer the eager scipy.sparse and scipy.spatial imports (~280 ms)", merged as6bbde1afromclaude/defer-scipy-sparse-import.PyAutoArray@main— verified against a fresh read-only checkout: no module-scopescipy.sparseorscipy.spatialimport survives anywhere inautoarray/; every reference is function-local.79d057ce(2026-08-22) wrote the correction into the prompt the day it shipped.Result on the record:
import autoarray464.4 ms → 183.7 ms (medians of 15 runs, Python 3.13, dev extras) — a 281 ms saving. Suites green: autoarray 1179, autogalaxy 1103/1 skipped, autolens 532/1 skipped.Why it was still pickable
The implementation recorded its own correction back into the prompt but left the file in
draft/withStatus: in-flight. The 2026-08-24 reconciliation sweep (06d76dbb) touched this file to repoint a cross-reference and passed over it —in-flightreads as live work, not shipped work — so it kept rendering as backlog. That is the miss this PR closes.What the record keeps
The prompt's premise was wrong in exactly the way its pynufft predecessor's was, so the record carries the correction rather than just the outcome:
scipy.sparsewas never imported fromderivative_util.py.scipy.spatial(134 ms) pulls it (154 ms) in transitively, so deferringcsr_matrixalone achieved nothing and both had to go. A module'simporttimecumulative figure is not its exclusive cost — now hit twice._load_nufftax()needed its module-level cache only because unpickled Pool workers never re-run__init__.delaunay.pyhad been left half-deferred (local imports at two of three use sites), which bought exactly zero — the surviving module-scope import kept the subtree on the path.Changes
complete/2026/08/defer-scipy-sparse-import.md— the rich record, original prompt folded in.draft/maintenance/libraries/defer_scipy_sparse_import.md.remove-pynufft-legacy-transformerandpynufft_removal_downstream_residue, correcting their stale "~0.10 s" figure to the measured 281 ms.complete/index.md,dashboard.md,dashboard.html. Backlog 140 → 139.lifecycle.py check,orphansandindex --checkall OK.Generated by Claude Code