Skip to content
heliaAOT
API Reference
HELIA HUB

ConvertArgs

Machine-readable model

  • ConvertArgsclassConfiguration for the conversion process.
class

Configuration for the conversion process.

helia_aot/cli/defines.py:663

ConvertArgs()

Configuration for the conversion process.

attribute

path

Python

helia_aot/cli/defines.py:699

path: Path | None = Field(None, exclude=True, description='Path to yaml configuration')

Path to the YAML configuration it was loaded from, if any.

attribute

platform

Python

helia_aot/cli/defines.py:705

platform: PlatformArgs = Field(default_factory=PlatformArgs, description='Target platform configuration')

Target platform configuration.

attribute

operators

Python

helia_aot/cli/defines.py:706

operators: list[OperatorRuleset] = Field(default_factory=list, description='Operator attributes and optimization knob overrides')

Operator attribute rules and optimization knob overrides.

attribute

helia_aot/cli/defines.py:721

optimization: OptimizationArgs = Field(default_factory=OptimizationArgs, description='Optimization goal, approximation gate and knobs')

Optimization goal, approximation gate and knobs.

attribute

verbose

Python

helia_aot/cli/defines.py:724

verbose: int = Field(1, ge=0, le=3, description="Verbosity level: 0 errors only, 1 stage milestones, 2 debug details, 3 debug details with each AIR operator's tensors and options")

Verbosity level, 0 to 3. The command line sets its log level from it: 0 logs errors only, 1 stage milestones (the default), 2 debug details, and 3 debug details with each AIR operator’s tensors and options. AotConverter.convert() leaves the helia_aot logger’s level and handlers as the caller set them, and only adds the per-operator records levels 2 and 3 log. The Results summary prints at every level; the log text is not part of the API.

attribute

helia_aot/cli/defines.py:734

keep_work_dir: bool = Field(False, description='Keep the temporary work directory and log its path')

Keep the temporary work directory after the conversion instead of removing it, and log its path.

attribute

helia_aot/cli/defines.py:735

result_views: bool = Field(False, description='Fill the operators, tensors, regions and placements views of the ConversionResult that AotConverter.convert() returns', json_schema_extra=stability(cli=False))

Fill the operators, tensors, regions and placements views of the ConversionResult that AotConverter.convert() returns; they stay None otherwise. The generated module is the same either way. It has no CLI flag, since the command line returns no result.

method

from_yaml

Python

Load a conversion config from a YAML file.

helia_aot/cli/defines.py:810

from_yaml(path: str | Path) -> ConvertArgs

classmethod

Load a conversion config from a YAML file.

The canonical programmatic entry point mirroring the CLI’s --path (without the CLI’s flag-override merge):

config = ConvertArgs.from_yaml(“my-model.yaml”) AotConverter(config=config).convert()

Parameters of from_yaml
NameTypeDefaultDescription
pathstr | PathRequiredPath to a YAML mapping of conversion options.
Returns of from_yaml
TypeDescription
ConvertArgsThe validated configuration.
Errors raised by from_yaml
TypeDescription
InvalidConfigErrorIf the file does not exist, cannot be read, is not UTF-8 or YAML, or is not a mapping, or if a key or value is invalid. Its ``exit_code`` is 2, the command line's status for the same file. For an invalid key or value the message lists every problem as the command line does, an unknown key with a did-you-mean suggestion, and pydantic's ``ValidationError`` is the ``__cause__``. Operator attributes are checked by ``AotConverter.convert()``, against its registry context.