qewton.data.datasets package¶
Module contents¶
Subpackages¶
- qewton.data.datasets.array_data package
- Module contents
- Submodules
- qewton.data.datasets.array_data.base module
ArrayLikeDataSetArrayLikeDataSet.from_file()ArrayLikeDataSet.update_configs()ArrayLikeDataSet.setup()ArrayLikeDataSet.to()ArrayLikeDataSet.data_configsArrayLikeDataSet.get_batch()ArrayLikeDataSet.data_set_loadedArrayLikeDataSet.get_continuous_batch()ArrayLikeDataSet.load_complete_data()ArrayLikeDataSet.load()
- qewton.data.datasets.array_data.grid module
- qewton.data.datasets.array_data.hdf5 module
Submodules¶
qewton.data.datasets.base module¶
Base class definitions for all datasets.
- class qewton.data.datasets.base.DataSet(*args, **kwargs)[source]¶
Bases:
ABC,SerializableAbstract base class for all datasets.
A DataSet provides a standard interface for accessing data samples, batches, and configuration metadata. It supports both eager and lazy loading.
- abstract property data_configs: list[DataConfiguration]¶
Returns the data configurations for the data stored in this dataset.
- abstractmethod get_batch(idcs) list[Any][source]¶
Retrieve a batch of data given a list of indices.
- Parameters:
idcs (list[int]) – Indices of the samples to retrieve.
- Returns:
- A list where each element corresponds to a data object
(e.g., input tensors, targets).
- Return type:
list[Any]
- abstractmethod get_continuous_batch(start_idx, end_idx) list[Any][source]¶
Retrieve a continuous slice of data.
- Parameters:
start_idx (int) – Starting index.
end_idx (int) – Ending index.
- Returns:
Sliced data objects.
- Return type:
list[Any]
- abstractmethod load_complete_data(variable=None, data_item=None)[source]¶
Fully load the data into memory. Many subclasses provide lazy slicing, where data is only read from the disk when needed.
This returns the whole dataset at once.
- property metadata: dict¶
Optional metadata associated with the dataset (e.g., HDF5 attributes).
- property data_set_loaded: bool¶
Check if the dataset is fully loaded into memory.
- Returns:
True if all data objects are loaded, False otherwise.
- Return type:
bool