class
TransformPipeline
PythonOrdered sequence of AIR-to-AIR transforms applied to a model.
TransformPipeline(transforms: list[AirTransform])Ordered sequence of AIR-to-AIR transforms applied to a model.
Built from config by from_config, which expands the "*" wildcard
spec against the transform registry so every registered transform gets an
explicit enabled/disabled decision.
attribute
transforms
Pythontransforms = transformsmethod
apply
PythonApply every enabled transform in order.
apply(model: AirModel) -> AirModelApply every enabled transform in order.
The model’s structure (structure_violations) and its operator
order, which is the execution order (order_violations), are checked
before the first transform and after each one; the error names the
stage that broke it.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
model | AirModel | Required | The model to transform. |
Returns
| Value | Type | Description |
|---|---|---|
AirModel | AirModel | The transformed model. |
Raises
| Type | Description |
|---|---|
ModelStructureError | If a tensor reference, producer or alias is ill-formed, in the loaded model or after a transform. |
OperatorOrderError | If an operator reads a tensor that a later operator produces, in the loaded model or after a transform. |
method
from_config
Pythonfrom_config(specs: list[TransformSpec], transform_registry: Registry[str, type[AirTransform]]) -> TransformPipelineclassmethod