ModalityDefaultsΒΆ

class standard_e2e.dataset_utils.modality_defaults.ModalityDefaults[source]ΒΆ

Bases: ABC

Base class for modality-specific default value handling on the fly.

abstract property allowed_modalities: list[Modality]ΒΆ

Return a list of allowed modalities for this defaults handler.

final normalize(raw_value, modality)[source]ΒΆ

Normalize a raw modality payload using the subclass implementation.

Parameters:
  • raw_value (Any) – Raw modality payload (may be None).

  • modality (Modality) – Modality to normalize; must be present in allowed_modalities.

Returns:

The normalized payload produced by _normalize.

Return type:

Any

Raises:

ValueError – If modality is not a Modality enum member or is not allowed for this defaults handler.