New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-38091: Use InMemoryDatasetHandle #758
Merged
Merged
Conversation
This file contains 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
timj
force-pushed
the
tickets/DM-38091
branch
from
February 21, 2023 21:46
1489aa2
to
a85cd21
Compare
timj
force-pushed
the
tickets/DM-38091
branch
3 times, most recently
from
February 22, 2023 23:28
c579c82
to
9cf4c36
Compare
erykoff
reviewed
Feb 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks basically good, but I'm a bit worried that we have two different patterns here about how to subclass the InMemoryDatasetHandle
, to generate a dataId or not. I'd like to settle on one or the other.
timj
force-pushed
the
tickets/DM-38091
branch
3 times, most recently
from
April 11, 2023 19:39
ca63db3
to
9a800df
Compare
This mostly involves constructing a dataId from the kwargs. Some get() methods are retained because they use clone() to ensure a deep copy is returned for testing.
This in theory can allow tests to run without requiring a butler since InMemoryDatasetHandle is designed to be compatible with a Butler DeferredDatasetHandle.
This removes the use of a butler and significantly speeds up the testing.
The specialist version did copy the returned data frame but it seems that the tests don't modify the data anyhow so there is no need for that to be used.
timj
commented
Apr 13, 2023
timj
commented
Apr 13, 2023
erykoff
reviewed
Apr 13, 2023
Previously this triggered an IndexError in assembleMetadata which is assuming at least one data reference is present.
We still need this method to exist because AssembleCoaddTask requires that every call to get() returns a brand new independent clone.
The test doesn't need a real DataCoordinate any more.
erykoff
approved these changes
Apr 13, 2023
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.
Many of the get() implementations here might Just Work using the default ExposureF delegate although the cloning going on makes me worried that the returned item is modified and so it won't work because we don't clone in the default delegate. We might also need to think about a way for an InMemoryDatasetHandle to specify a default dataId constructor and also whether additional kwargs can be stored and then retrieved later on.
Requires lsst/pipe_base#318