Skip to content
heliaAOT
HELIA HUB

ConvertArgs

Machine-readable model

  • ConvertArgsclassConfiguration for the conversion process.
class

Configuration for the conversion process.

helia_aot/cli/defines.py:473

ConvertArgs()

Configuration for the conversion process.

attribute

path

Python

helia_aot/cli/defines.py:495

path: Path = Field(default_factory=lambda : ..., exclude=True, description='Path to yaml configuration')

Path to yaml configuration.

attribute

platform

Python

helia_aot/cli/defines.py:505

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

Target platform configuration.

attribute

operators

Python

helia_aot/cli/defines.py:506

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:521

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

Optimization goal, approximation gate and knobs.

attribute

helia_aot/cli/defines.py:526

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.

method

Return the operator attribute rules, without optimization knobs.

helia_aot/cli/defines.py:529

operator_rules() -> list[AttributeRuleset]

Return the operator attribute rules, without optimization knobs.

Returns of operator_rules
TypeDescription
list[AttributeRuleset]list[AttributeRuleset]: The rules to resolve operator attributes from.
method

Return the optimization knob rules, resolved like attributes but on their own channel.

helia_aot/cli/defines.py:539

knob_rules(*, include_model_knobs: bool = True) -> list[AttributeRuleset]

Return the optimization knob rules, resolved like attributes but on their own channel.

The model-wide knobs (optimization.accumulation) become a leading "*" rule, so every operators[].optimization override wins over them with the usual type/id specificity.

Parameters of knob_rules
NameTypeDefaultDescription
include_model_knobsboolTrueLead with the model-wide knob rule.
Returns of knob_rules
TypeDescription
list[AttributeRuleset]list[AttributeRuleset]: Rules whose attributes are knob values.
method

Return the knobs set explicitly under optimization, even when set to auto.

helia_aot/cli/defines.py:562

explicit_model_knobs() -> frozenset[str]

Return the knobs set explicitly under optimization, even when set to auto.

method

Return each operators[] rule that overrides knobs, with its position.

helia_aot/cli/defines.py:566

operator_knob_rules() -> list[tuple[int, AttributeRuleset]]

Return each operators[] rule that overrides knobs, with its position.

Returns of operator_knob_rules
TypeDescription
list[tuple[int, AttributeRuleset]]list[tuple[int, AttributeRuleset]]: ``(index in operators, rule)``,
list[tuple[int, AttributeRuleset]]where the rule's attributes are its knob overrides.
method

from_yaml

Python

Load a conversion config from a YAML file.

helia_aot/cli/defines.py:584

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; unknown nested keys warn as usual.
Errors raised by from_yaml
TypeDescription
FileNotFoundErrorIf ``path`` does not exist.
ValueErrorIf the file is not a YAML mapping.