modularml.core.data_structures.sample

Classes

Sample(features, ...)

Container for a single sample.

class modularml.core.data_structures.sample.Sample(features: ~typing.Dict[str, ~modularml.core.data_structures.data.Data], targets: ~typing.Dict[str, ~modularml.core.data_structures.data.Data], tags: ~typing.Dict[str, ~modularml.core.data_structures.data.Data], label: str | None = None, uuid: str = <factory>)

Bases: object

Container for a single sample.

features

A set of input features. Example: {‘voltage’: np.ndarray}

Type:

Dict[str, Any]

targets

A set of target values. Example: {‘soh’: float}

Type:

Dict[str, Any]

tags

Metadata used for filtering, grouping, or tracking.

Type:

Dict[str, Any]

label

Optional user-assigned label.

Type:

str, optional

uuid

A globally unique ID for this sample. Automatically assigned if not provided.

Type:

str