Repository navigation
fix: single-image recovery blind to inf-padded JAX solver output - #772
Merged
Merged
Conversation
Count finite point-solver rows, not array rows, before deciding whether the inward-walk single-image recovery runs, both in image_plane_multiple_image_positions and inside the walk itself. Only the finite rows are returned, so PositionsLH and the cached files/multiple_image_positions.json never see the (inf, inf) padding the JAX solver adds. Identity for NumPy solver output (no pins move). Closes #771 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Jammy2211
pushed a commit
that referenced
this pull request
Oct 7, 2026
…; retrigger CI after PyAutoGalaxy#641 merged)
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
Result.image_plane_multiple_image_positionsdecided whether to run the inward-walk single-image recovery withmultiple_images.shape[0] <= 1. Under a JAX analysis (xp=jnp) the point solver returns a static-shape array padded with(inf, inf)rows, so that test was never true and the recovery could not fire; since #765 a 1-image JAX solve then raisedPositionsExceptionatPositionsLHconstruction (discussion https://github.com/orgs/PyAutoLabs/discussions/30). The padded rows were also written into the cachedfiles/multiple_image_positions.json.Fix: a small
_finite_multiple_images_fromhelper drops non-finite rows, and bothimage_plane_multiple_image_positionsand the inward walk inimage_plane_multiple_image_positions_for_single_image_fromnow count finite rows. Only finite rows are returned, soPositionsLHand the JSON cache never see the padding. The explanatory comment (zero-images case) is kept and extended.Pin risk: none for finite inputs — the NumPy solver already removes non-finite rows, so the filter is the identity there; no numerical pins move.
Closes #771.
API Changes
None to the public API — behaviour fix: inf-padded (JAX) solver output now triggers single-image recovery and is stripped of padding before being returned/cached. Adds private static helper
Result._finite_multiple_images_from.See full details below.
Test Plan
test_autolens/analysis/test_result.py(solversolvemonkeypatched): padded 1-image array triggers recovery; padded 2-image array returns exactly the 2 finite rows; unpadded 2-row array unchanged; inward walk counts finite rowspython -m pytest test_autolens/analysis -q— 101 passedtest_autolenssuite — 831 passed, 1 xfailed (10.5 min)Heart readiness at ship: YELLOW (release validation stale; manifest drift; Hands "PyAuto Release" and Heart "Workspace Smoke" red) — acknowledged by the human for development PRs.
Full API Changes (for automation & release notes)
Removed
Added
Result._finite_multiple_images_from(multiple_images)(private, static) — drops non-finite solver rowsMigration
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code