Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the Preloads mechanism from the PyAutoLens API surface and internal fit/inversion construction flow, simplifying how fits are created and configured.
Changes:
- Removed
preloadsparameters and plumbing fromFitImaging,FitInterferometer,TracerToInversion, and analysis classes. - Stopped exporting
Preloads/mapper_indices_fromfromautolens.__init__. - Updated imaging simulation / fit tests to no longer build or pass
Preloads, adjusting pixelization/settings and expected results accordingly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
autolens/imaging/fit_imaging.py |
Removes preloads argument/storage and stops passing it into inversion setup. |
autolens/interferometer/fit_interferometer.py |
Removes preloads argument/storage and stops passing it into inversion setup. |
autolens/lens/to_inversion.py |
Removes preloads from constructor and downstream galaxy/inversion construction calls. |
autolens/imaging/model/analysis.py |
Removes preloads forwarding when creating FitImaging. |
autolens/interferometer/model/analysis.py |
Removes preloads forwarding when creating FitInterferometer. |
autolens/analysis/analysis/dataset.py |
Removes preloads from analysis dataset initialization/plumbing. |
autolens/__init__.py |
Removes top-level exports of Preloads and mapper_indices_from. |
test_autolens/imaging/test_simulate_and_fit_imaging.py |
Refactors tests to eliminate Preloads usage and updates expectations/settings accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
This pull request removes support for passing and handling the
Preloadsobject throughout theautolenscodebase. All references topreloadshave been removed from constructors, function calls, and tests. The changes simplify the API and internal logic by eliminating the need to manage preloading of mapper indices and related data structures.The most important changes are:
API and Internal Logic Simplification:
Removed the
preloadsparameter from constructors and method calls in key classes and functions, includingFitImaging,FitInterferometer,TracerToInversion, and related analysis/model classes (autolens/imaging/fit_imaging.py,autolens/interferometer/fit_interferometer.py,autolens/lens/to_inversion.py,autolens/analysis/analysis/dataset.py,autolens/imaging/model/analysis.py,autolens/interferometer/model/analysis.py). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]Removed the import and usage of
Preloadsandmapper_indices_fromfrom the main package initialization (autolens/__init__.py).Test Updates:
test_autolens/imaging/test_simulate_and_fit_imaging.pyto remove all usage of thePreloadsobject and related manual setup, updating assertions and test logic accordingly. [1] [2] [3] [4] [5]Behavioral Adjustments:
These changes collectively modernize the codebase and make it easier to maintain by removing legacy preloading mechanisms.