perf(triangles): raise PointSolver MAX_CONTAINING_SIZE 15 → 20 (#583) - #584
Merged
Merged
Conversation
… phase 4c) The JAX PointSolver keeps at most MAX_CONTAINING_SIZE containing triangles per refinement step and truncates the rest silently. On 200 prior draws the uncapped step-0 maximum was 17 (prior draw 12), so 15 was truncating. 20 clears it with margin; measured on RAL 8490H (job 358976) at +6.2 % scalar median, compile +7.0 %, no image-set, position or log L change on any draw and the fiducial log L bit-identical. New test: a 16- and 17-sheet fold (the static lattice traced through z**k) keeps every containing triangle under jit at the default, pads to (20,), and the old cap of 15 passed explicitly drops some. Red at 15. Refs #583 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Workspace PRs: PyAutoLabs/PyAutoLens#753 (companion library), PyAutoLabs/autolens_profiling#335 (profiling data) |
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
This raises the JAX
PointSolver's per-step containing-triangle capMAX_CONTAINING_SIZEfrom 15 to 20 (phase 4c, #583). The cap silently truncates. The phase-4a sweep counted without it and found a maximum of 17 at step 0 on 1 of 200 prior draws, and a smaller grid (±2.5/0.4) already hits exactly 15. At 20 there are 3 triangles of headroom, and no draw exceeds the cap on any refinement step.The value was chosen by the human from a measured A/B, run interleaved through
solver_config_sweep.py --mcs-headroom:7.743201200876812(A100…806) is unchanged.(MCS, 2)shape changes the order of the backward sum.API Changes
Changed default:
autoarray.structures.triangles.array.MAX_CONTAINING_SIZEgoes from 15 to 20. It is the defaultmax_containing_sizeofArrayTrianglesandArrayTriangles.for_limits_and_scale. JAXPointSolveroutputs are padded to(20, 2)instead of(15, 2). No workspace, workspace_test or HowToLens script assumes the old shape.See full details below.
Test Plan
test_coordinate_jax.py::test__containing_set_above_the_old_cap_is_not_truncated[16|17]: a z → z**k lattice with k preimages strictly inside distinct triangles. It fails at 15 (keeps 15 of 16/17) and passes at 20. It also checks thewith_verticespath.point_source/jax_likelihood/*andpoint_source/jax_grad/gradient.pypass; the pinned −83.38049777774609 is unchanged.Full API Changes (for automation & release notes)
Changed Behaviour
autoarray.structures.triangles.array.MAX_CONTAINING_SIZE: 15 → 20. It is the defaultmax_containing_sizeforArrayTriangles(...)andArrayTriangles.for_limits_and_scale(...). JAXPointSolverpadded positions go from(15, 2)to(20, 2).Part of #583.
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code