Separate the act of resolving vs loading a dataset - #717
Open
ashkrisk wants to merge 1 commit into
Open
Conversation
Make it so that the `DataSetLoader` is no longer responsible for deciding how to make a dataset's files available to the application. It remains responsible solely for resolving a dataset's files, which includes fetching them from a remote if required. To faciliate this, the `DataSetInfo` object now knows about the underlying files which make up a dataset and is free to provide methods which allow the caller to access the dataset in a format of their choosing. In particular, this makes it possible to add methods to `DataSetInfo` which allow for accessing datasets without loading them completely into memory. Summary of changes: - Introduces the `DataSetFiles` class for wrapping the base/query/gt paths of a dataset. - `DataSetInfo` no longer accepts a `Supplier<Dataset>`, instead accepting a `DataSetFiles` object. - `DataSetInfo` is responsible for converting `DataSetFiles` to an in-memory `DataSet` or other future formats. Possible alternatives: - Introduce an additional abstraction layer responsible for converting `DataSetFiles` to a `DataSet` or similar instead of passing the responsiblity onto `DataSetInfo`. This increases complextiy without much immediate benefit, so this is left to future patches if and when it becomes necessary (if we start supporting HDF5 again, for example).
Contributor
|
Before you submit for review:
If you did not complete any of these, then please explain below. |
ashkrisk
marked this pull request as ready for review
August 31, 2026 04:40
ashkrisk
requested review from
MarkWolters,
jshook and
tlwillke
as code owners
August 31, 2026 04:40
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.
Make it so that the
DataSetLoaderis no longer responsible for deciding how to make a dataset's files available to the application. It remains responsible solely for resolving a dataset's files, which includes fetching them from a remote if required.To faciliate this, the
DataSetInfoobject now knows about the underlying files which make up a dataset and is free to provide methods which allow the caller to access the dataset in a format of their choosing. In particular, this makes it possible to add methods toDataSetInfowhich allow for accessing datasets without loading them completely into memory.Summary of changes:
DataSetFilesclass for wrapping the base/query/gt paths of a dataset.DataSetInfono longer accepts aSupplier<Dataset>, instead accepting aDataSetFilesobject.DataSetInfois responsible for convertingDataSetFilesto an in-memoryDataSetor other future formats.Possible alternatives:
DataSetFilesto aDataSetor similar instead of passing the responsibility ontoDataSetInfo. This increases complexity without much immediate benefit, so this is left to future patches if and when it becomes necessary (if we start supporting HDF5 again, for example).