dqm_ml_job.dataloaders.proto
Protocol definitions for data loaders and selections.
This module contains the DataLoader and DataSelection protocol classes that define the interface for data loading implementations.
DataLoader
Bases: Protocol
Protocol for Data Loader factories.
A DataLoader is responsible for scanning a source (disk, DB, S3) and discovering available DataSelections based on its configuration.
Source code in packages/dqm-ml-job/src/dqm_ml_job/dataloaders/proto.py
get_selections() -> list[DataSelection]
Discover and return the list of available selections for this loader.
Returns:
| Type | Description |
|---|---|
list[DataSelection]
|
A list of initialized DataSelection instances. |
DataSelection
Bases: Protocol
Protocol for a specific subset of data discovered by a DataLoader.
A DataSelection represents a concrete set of samples (e.g., a specific folder, a filtered view of a database, or a single file) and provides an iterator over data batches.
Source code in packages/dqm-ml-job/src/dqm_ml_job/dataloaders/proto.py
name: str
instance-attribute
__iter__() -> Any
bootstrap(columns_list: list[str]) -> None
Perform initial setup for the selection before iteration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
columns_list
|
list[str]
|
List of column names to load. |
required |
get_nb_batches() -> int
Return the estimated number of batches in this selection.
Used primarily for progress bar estimation.