NoOptions
PythonAirTransform.OPTIONS of a transform that takes no options.
NoOptions()AirTransform.OPTIONS of a transform that takes no options.
NoOptionsclassAirTransform.OPTIONS of a transform that takes no options.AirTransformclassBase class for all AIR model fusion/transformations.AirTransform.OPTIONS of a transform that takes no options.
NoOptions()AirTransform.OPTIONS of a transform that takes no options.
Base class for all AIR model fusion/transformations.
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.
NAME: strOPTIONS: type | None = NoOptionsenabled = enabledoptions = options or {}Unique name of the transform.
name: strUnique name of the transform.
Perform the transform on the given model.
apply(model: AirModel) -> AirModelabstractmethod
Perform the transform on the given model.