torchcell.data.ReferenceIndex

class ReferenceIndex(*, data: list[ExperimentReferenceIndex])[source]

Bases: ModelStrict

A collection of reference-indices partitioning a dataset’s experiments.

classmethod validate_data(v: list[ExperimentReferenceIndex]) → list[ExperimentReferenceIndex][source]

Check the member-index sets partition range(N) exactly (cover once, no gap) and that no reference appears in two entries (DuplicateReferenceError).

References are compared by reference_key (class name plus key-sorted JSON dump), not by ==: a NaN-bearing reference and its separately built copy are refused although == calls them unequal, and combine merges them.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].