Skip to content

fix: XLA census PSF anchors stale after PyAutoArray convolver move - #534

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/xla-census-anchors-convolver
Nov 24, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/xla-census-anchors-convolver

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Fixes the red lint on main (since 2026-11-22): PyAutoArray main moved the functions in autoarray/operators/convolver.py down by about 60 lines, so the XLA census's hard-coded PSF line ranges no longer enclosed them and test_census_anchors_verify_against_the_installed_pyautoarray failed. Every range was re-derived with ast against PyAutoArray origin/main (e70af85d):

Function Old New
convolved_mapping_matrix_from 1086-1300 1153-1330
_convolved_mapping_matrix_over_sampled_np_from 632-642 693-702
_convolved_mapping_matrix_over_sampled_jax_from 670-691 731-750
FFT body (_convolved_over_sampled_jax_from) 555-607 616-666
image helpers 520-700, 1000-1085 583-729, 1006-1151

The stage rules, the requires= rule, _is_mapping_convolution (the census's mapping-convolution check), CENSUS_ANCHORS and the comment move together. Unblocks autolens_profiling#532's lint.

Follow-up (out of scope, cheap): census_anchor_status() already resolves live function spans with ast, so the rules could take their ranges from those spans at census time instead of hard-coding line numbers; that would stop this recurring each time PyAutoArray moves code.

Closes #533

Scripts Changed

  • scripts/misc/likelihood_breakdown/xla_attribution.py — PSF convolution StageRule ranges, requires=, _is_mapping_convolution and CENSUS_ANCHORS re-derived from current PyAutoArray convolver.py
  • scripts/misc/likelihood_breakdown/test/test_xla_attribution.py — docstring quoting the old range

Test Plan

  • ruff check . and ruff format --check . clean
  • pytest scripts/misc/*/test -q against PyAutoArray origin/main: 1907 passed, 6 skipped, 0 failed (including the anchor test)
  • lint workflow green on this PR (Witness: test_census_anchors_verify_against_the_installed_pyautoarray passes)

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

PyAutoArray main moved the convolver.py functions down ~60 lines, so the
hard-coded PSF StageRule / CENSUS_ANCHORS ranges no longer enclosed them
and test_census_anchors_verify_against_the_installed_pyautoarray failed.
Ranges re-derived with ast against PyAutoArray origin/main.

Closes #533

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 5f56fb2 into main Nov 24, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/xla-census-anchors-convolver branch November 24, 2026 10:05
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.

fix: XLA census PSF anchors stale after PyAutoArray convolver move

1 participant