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-20205 Add ability to defer loading datasets #181
Conversation
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 OK but please check parameter to self._get
call.
|
||
@dataclasses.dataclass(frozen=True) | ||
class DeferredDatasetHandle: | ||
"""Class to support deferred loading of a dataset from a butler |
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.
Sentences should end with dot.
typically used to efficiently read only a subset of the dataset. | ||
kwds : `dict` | ||
Additional keyword arguments used to augment or construct a | ||
`DataId`. See `DataId` parameters. |
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.
``dataId`` parameter?
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.
No in this case I do mean a DataId object itself
else: | ||
mergedParameters = {} | ||
|
||
return self._get(parameters) |
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.
Do you want to pass mergedParameters
here?
parameters : `dict` or None | ||
parameters passed to the butler get method. Defaults to None. | ||
If not None, this dict will be merged with the parameters dict | ||
used to construct the `DeferredDatasetHandle` class |
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.
Sentences should start with capital letter and end with dot.
python/lsst/daf/butler/butler.py
Outdated
def getDeferred(self, datasetRefOrType: typing.Union[DatasetRef, DatasetType, str], | ||
dataId: typing.Union[dict, DataId] = None, parameters: typing.Union[dict, None] = None, | ||
**kwds) -> dDH.DeferredDatasetHandle: | ||
|
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.
Extraneous empty line
45fb698
to
16cb489
Compare
Add the ability for the butler to return a handle to a dataset such that actual loading of the dataset can occur at a later time.
16cb489
to
03b8715
Compare
Add the ability for the butler to return a handle to a dataset
such that actual loading of the dataset can occur at a later time.