Conversation
rhayes777
approved these changes
Mar 25, 2024
|
|
||
| from autogalaxy.analysis.adapt_images.adapt_images import AdaptImages | ||
|
|
||
| class AdaptImageMaker: |
Collaborator
There was a problem hiding this comment.
There's a not a huge amount of point in this class given that you could simply call:
result.adapt_images_from(
use_model_images=self.use_model_images
)
Comment on lines
+117
to
+118
| if isinstance(paths, af.DatabasePaths): | ||
| return |
Collaborator
There was a problem hiding this comment.
Why the exception here? Might be cleaner to put this outside the function
| settings typically control the overall run-time. | ||
| """ | ||
|
|
||
| if paths is None: |
Comment on lines
+64
to
+70
| @property | ||
| def preloads_cls(self): | ||
| return Preloads | ||
|
|
||
| @property | ||
| def fit_maker_cls(self): | ||
| return FitMaker |
Collaborator
There was a problem hiding this comment.
You can also do this by setting class level attributes.
class AnalysisDataset(Analysis):
Preloads = Preloads
FitMaker = FitMaker
Collaborator
Author
There was a problem hiding this comment.
Going to do this in a moment when I do it for the Result casting.
Comment on lines
+139
to
+140
| os.makedirs(paths.profile_path, exist_ok=True) | ||
| self.preloads.output_info_to_summary(file_path=paths.profile_path) |
Collaborator
There was a problem hiding this comment.
Handle directory creation right before the data is output (e.g. in the output_info_to_summary method)
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.
Recent updates changed it so that the
AdaptImageswere computed and passed to anAnalysisobject during search chaining pipelines.However, this meant resuming already completed pipelines is slow, because the adapt images would be computed for each fit even though for fits that are already completed the adapt images are not used.
This PR instead uses an
AdaptImageMakerobject, which computes theAdaptImageswhen they are used and then caches them. This means pipelines can be resumed much faster again.