Skip to content
heliaAOT
API Reference
HELIA HUB

transform

Machine-readable model

  • NoOptionsclassAirTransform.OPTIONS of a transform that takes no options.
  • AirTransformclassBase class for all AIR model fusion/transformations.
class

Base class for all AIR model fusion/transformations.

helia_aot/transforms/transform.py:33

AirTransform(enabled: bool = True, options: dict[str, Any] | None = None)

Base class for all AIR model fusion/transformations.

The converter runs transforms after propagate_shapes, so every tensor shape is already resolved when apply is called. Shape propagation does not run again afterwards; a transform that adds tensors or changes a shape must leave the model’s shapes consistent itself.

OPTIONS is the pydantic model or pydantic dataclass whose fields are the transform’s option keys; the default, NoOptions, takes none. On construction a former key of a renamed option is replaced by its current key in self.options, with a warning; an unknown key raises InvalidConfigError, and so, when the transform is enabled, does a value the option’s type rejects. A transform that checks its own options opts in to free-form ones with OPTIONS = None. Any other OPTIONS is a TypeError when the subclass is defined.