Repository navigation
feat: accept bare MassField in the fields slot - #744
Merged
Merged
Conversation
This was referenced Sep 18, 2026
Collaborator
Author
|
Euclid pipeline adoption: PyAutoLabs/euclid_strong_lens_modeling_pipeline#90 (bare single-field models; source-checkout deployment). |
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
A model using
fields=af.Model(al.MassField, ...)currently builds but fails when analysis constructs its tracer. Normalize a bare field to a one-element list across analysis, aggregation, Result and direct/sliced Tracer construction, before checking the mass/light geometry.Closes #743.
API Changes
The public API is widened additively:
fields=fieldjoins the existing collection/list form. Collections remain the primary documented model form. No workspace migration or PyAutoGalaxy change is needed. See full details below.The two forms have different identifiers by design because their prior paths differ. Before any source edits, a subprocess under shipped configuration reproduced:
fields.field.shear.gamma_1c5cf98ea7733689dc8c0ede6939c1d83fields.shear.gamma_136a0be37c9667958bafca2f01e487f80The new subprocess regression pins both identifiers, counts and shear paths, and checks that all galaxy prior paths match. Existing validation tests and both existing identifier tests remain unmodified.
Test Plan
NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autolens/: 739 passed, 1 xfailed, 34 warnings in 156.77s.Red witness traceback (before source edits)
Full API Changes (for automation & release notes)
Changed Signature
autolens.Tracer(..., fields=...)andautolens.Tracer.sliced_tracer_from(..., fields=...)annotations now include a singleMassField.Changed Behaviour
fieldsslot accepts one instantiatedMassFieldas well as the existing collection; analysis, saved-result aggregation andResult.max_log_likelihood_fieldsnormalize it to a list.MassField;tracer.fieldsremains a fresh plain list, neverNone.MultiPlaneRedshiftWarningchecks, preserving geometry diagnostics.Migration
fields=af.Collection(field=field)retains its prior paths, prior count and result identifier. Opting intofields=fieldshortens the prior paths and intentionally changes its result identifier.autolens.lens.tracer_util.fields_list_fromis internal and is not exported inautolens.__init__or API autosummary.Generated by the PyAutoLabs agent workflow.
Heart RED development-shipping override
Human development-shipping override recorded for PyAutoLens #743 on 2026-09-18.
Current Heart RED:
release validation FAILED (stage integrate).Current YELLOW:
manifest drift: remote-session blocks (generated) — 2 mismatch(es) vs PyAutoMind/repos.yaml.Passed branch gates: 739 passed / 1 xfailed (full suite); 157 downstream smoke checks; independent Sol review CLEAN. Collection identifier reproduced and pinned unchanged; red witness captured before source edits.
Authorized: commit, push, pending-release PR; merge in this turn only if every CI workflow/matrix leg is green and other merge gates pass. No release or CI bypass; this feature does not repair Heart.