Skip to content

fix(profiling): accept PyAutoArray's new solver/stats kwargs in the solver injections (PyAutoArray#566) - #299

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/certified-positive-solver
Sep 23, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/certified-positive-solver

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

PyAutoArray#566 (PR #567) adds two optional keyword arguments, solver="pdip" and stats=None, to inversion_util.reconstruction_positive_only_from. The profiling harness's solver injections monkeypatch that function and assert (_assert_signature_covers) that the wrapper's signature covers the library's, so against the new library they failed. This PR makes both injections declare the new kwargs and forward them only to a library that accepts them, so the harness runs against the pre-#566 and the #566 library alike. Route (d)'s PDIP fallback now pins solver="pdip" explicitly, so a library config selecting its own certified solver cannot change what the harness falls back to.

Merge order: this PR may only merge AFTER PyAutoLabs/PyAutoArray#567 (library-first gate). This repo's lint workflow checks out PyAutoArray main, so test_fallback_pins_the_library_pdip_solver (which needs the #566 signature) skips there until #567 merges and asserts once it has; CI stays green on both.

Scripts Changed

  • scripts/misc/likelihood_breakdown/library_solver_injection.py — certified injection declares solver/stats, forwards them via _library_kwargs only when the library has them; fallback pins solver="pdip".
  • scripts/misc/likelihood_breakdown/fixed_light_numpy_solvers.py — numpy solver injection declares solver/stats and forwards them on the delegated JAX path only to a library that accepts them (inlined, no JAX import); injected kernel renamed injected to free the solver keyword.
  • scripts/misc/test/test_fixed_light_library.py — tests for kwarg forwarding (old + new signature) and the pinned PDIP fallback (skips on a pre-#566 library).
  • scripts/misc/test/test_fixed_light_numpy_solvers.py — tests for the numpy injection's signature coverage and forwarding.

Upstream PR

PyAutoLabs/PyAutoArray#567

Test Plan

  • pytest scripts/misc/test against the NEW library (#567 branch, activate.sh): 795 passed / 5 skipped / 0 failed.
  • pytest scripts/misc/test against the OLD library (PyAutoArray main 22e6d608 first on PYTHONPATH): 794 passed / 6 skipped / 0 failed — the extra skip is test_fallback_pins_the_library_pdip_solver, which pytest.skips when reconstruction_positive_only_from has no solver kwarg (commit 2b013f9); every harness path (old-signature forwarding included) passes, so the harness still works pre-release.
  • ruff check . clean; ruff format --check . clean (208 files); build_readme.py --check exit 0; wall/check_submits.py --check 0 failing.
  • Import smoke: AUTOLENS_PROFILING_SMOKE=1 python scripts/imaging/likelihood_breakdown/fixed_light_trace.py --mesh delaunay exit 0.

Heart RED override

  • Heart verdict (re-read immediately before this PR, verbatim): RED release validation FAILED (stage integrate); YELLOW workspace validation not passing (4 failed, cloud#35579888156: autolens notebooks/cluster/modeling.ipynb, autolens notebooks/weak/a2744.ipynb, autolens scripts/cluster/modeling.py, +1 more); YELLOW manifest drift: hub organism blurb (organs present) — 7 mismatch(es) vs PyAutoMind/repos.yaml. Freeze: not frozen.
  • Branch gates passed: profiling tests 795 passed vs the new library, 794 passed + 1 extra skip vs the old; ruff/format/readme/check_submits clean; import smoke exit 0; independent review (Brain review faculty) CLEAN at 0473c6a (2b013f9 adds only the test skip).
  • Authorization: live user message i authorize, to the named issue-#566 (+ linked autolens_profiling fix) development override, per AUTONOMY.md "Human override for Heart RED (development only)".
  • Scope: commit / push / pending-release PRs only. No merge, no release, no CI bypass; this does not fix Heart. Merge needs a separate human /prm, after PyAutoArray#567 merges and with required checks green.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits September 23, 2026 15:25
…ertified solver injection (PyAutoArray#566)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…y solver injection too (PyAutoArray#566)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 23, 2026
…ibrary

lint.yml checks out PyAutoArray main, so asserting the #566 signature made
this PR's CI red by construction until PyAutoArray#567 merges; skip there,
assert on the new library.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 0435184 into main Sep 23, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/certified-positive-solver branch September 23, 2026 14:20
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant