feature_meta
feature_meta
¶
Feature metadata for typed feature validation across the encoding-decoding pipeline.
FeatureType
¶
Bases: StrEnum
Feature shape types for pipeline validation.
Determines how downstream modules (fusion, decoder) handle a feature tensor. The type is set explicitly by each encoder and fusion module, not inferred from dimension tuples.
FeatureMetadata
dataclass
¶
Typed descriptor for a named feature produced by an encoder or fusion module.
Travels through the pipeline: encoder/fusion → pipeline registry → decoder validation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
Feature name (e.g. |
required |
feature_type
|
str
|
One of |
required |
dimension
|
tuple[int, ...]
|
Shape excluding batch and time dimensions. Always a tuple:
FLAT |
required |
infer_feature_type
¶
Infer feature type from dimension tuple length.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dimension
|
tuple[int, ...]
|
Feature dimension tuple excluding batch and time. |
required |
Returns:
| Type | Description |
|---|---|
str
|
Feature type string value. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the dimension tuple length does not match any known type. |