modularml.core.data_structures.sample_collection
Classes
|
A lightweight container for a list of Sample instances. |
- class modularml.core.data_structures.sample_collection.SampleCollection(samples: List[Sample])
Bases:
objectA lightweight container for a list of Sample instances.
- get_all_features(format: str | DataFormat = DataFormat.DICT_NUMPY) Any
Returns all features across all samples in the specified format.
- get_all_tags(format: str | DataFormat = DataFormat.DICT_NUMPY) Any
Returns all tags across all samples in the specified format.
Each tag will be returned as a list of values across samples. The format argument controls the output structure.
- get_all_targets(format: str | DataFormat = DataFormat.DICT_NUMPY) Any
Returns all targets across all samples in the specified format.
- to_backend(backend: str | Backend) SampleCollection
Returns a new SampleCollection with all Data objects converted to the specified backend.