Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request removes the Preloads object and all associated preloading infrastructure from the autogalaxy codebase. This is a significant refactoring that simplifies the initialization and fitting logic across multiple modules by eliminating parameters and code paths related to preloading mesh grids and other precomputed data. The change reduces complexity while maintaining the ability to load precomputed mesh grids from fit objects when needed via the aggregator utilities.
Changes:
- Removed all references to
aa.Preloadsand thepreloadsparameter from constructors, method calls, and attributes across major modules including analysis, fit, and inversion classes - Simplified the
mesh_grids_of_planes_list_fromfunction by removing theuse_preloaded_gridparameter, making it always attempt to load preloaded grids when available - Removed the
preloads_fromfunction and associated imports from the package, completely decoupling the codebase from the preloading mechanism - Updated a test to explicitly specify
pixels=9in a Delaunay mesh for deterministic behavior
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
autogalaxy/analysis/analysis/analysis.py |
Removed preloads parameter and attribute from base Analysis class |
autogalaxy/analysis/analysis/dataset.py |
Removed preloads parameter from AnalysisDataset constructor call chain |
autogalaxy/imaging/model/analysis.py |
Removed preloads parameter from AnalysisImaging constructor and fit_from method, updated docstring |
autogalaxy/imaging/fit_imaging.py |
Removed preloads parameter and attribute from FitImaging class |
autogalaxy/interferometer/model/analysis.py |
Removed preloads parameter from AnalysisInterferometer constructor and fit_from method, updated docstring |
autogalaxy/interferometer/fit_interferometer.py |
Removed preloads parameter and attribute from FitInterferometer class |
autogalaxy/galaxy/to_inversion.py |
Removed preloads parameter and attribute from AbstractToInversion and GalaxiesToInversion classes, eliminated preloads from all mapper and inversion creation calls |
autogalaxy/aggregator/agg_util.py |
Simplified mesh_grids_of_planes_list_from to always load preloaded grids when available; removed preloads_from function entirely |
autogalaxy/__init__.py |
Removed imports of Preloads and mapper_indices_from from autoarray |
test_autogalaxy/galaxy/test_galaxy.py |
Added explicit pixels=9 parameter to Delaunay mesh in JSON serialization test for deterministic behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 primarily removes the use of the
Preloadsobject and associated logic from theautogalaxycodebase. This results in a significant simplification of the initialization and fitting logic across multiple modules, eliminating parameters and code paths related to preloading mesh grids and other precomputed data. The changes also update a test to explicitly specify the number of pixels in a mesh, likely to maintain test stability after the removal of preloads.Core simplifications and removals:
Removed all references to
aa.Preloadsand thepreloadsparameter from constructors and method calls in major modules, includinganalysis.py,dataset.py,to_inversion.py,fit_imaging.py,fit_interferometer.py, and their respective model analysis files. This includes both the passing of preloads and any logic or documentation related to it. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]Removed the import of
Preloadsand related utilities from the package’s__init__.pyfile, further decoupling the codebase from preloading mechanisms.Aggregator and utility logic updates:
mesh_grids_of_planes_list_fromfunction inagg_util.pyby removing theuse_preloaded_gridparameter and all logic related to loading precomputed mesh grids, as well as removing the now-obsoletepreloads_fromfunction. [1] [2]Test update:
test_galaxy.pyto explicitly set thepixelsparameter in aDelaunaymesh, likely to ensure deterministic behavior after the removal of preloads.