# helia_aot.cli.defines.ConvertArgs

## helia_aot.cli.defines.ConvertArgs

`class` · `python`

```python
ConvertArgs()
```

Configuration for the conversion process.

Source: `helia_aot/cli/defines.py:473`

### helia_aot.cli.defines.ConvertArgs.path

`attribute` · `python`

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

Path to yaml configuration.

Source: `helia_aot/cli/defines.py:495`

### helia_aot.cli.defines.ConvertArgs.model

`attribute` · `python`

```python
model: ModelArgs = Field(default_factory=ModelArgs, description='Model configuration')
```

Model configuration.

Source: `helia_aot/cli/defines.py:500`

### helia_aot.cli.defines.ConvertArgs.module

`attribute` · `python`

```python
module: ModuleArgs = Field(default_factory=ModuleArgs, description='Module configuration')
```

Module configuration.

Source: `helia_aot/cli/defines.py:501`

### helia_aot.cli.defines.ConvertArgs.test

`attribute` · `python`

```python
test: TestArgs = Field(default_factory=TestArgs, description='Test configuration')
```

Test configuration.

Source: `helia_aot/cli/defines.py:502`

### helia_aot.cli.defines.ConvertArgs.transforms

`attribute` · `python`

```python
transforms: list[TransformSpec] = Field(default_factory=list, description='Transforms configuration')
```

Transforms configuration.

Source: `helia_aot/cli/defines.py:503`

### helia_aot.cli.defines.ConvertArgs.memory

`attribute` · `python`

```python
memory: MemoryArgs = Field(default_factory=MemoryArgs, description='Memory configuration')
```

Memory configuration.

Source: `helia_aot/cli/defines.py:504`

### helia_aot.cli.defines.ConvertArgs.platform

`attribute` · `python`

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

Target platform configuration.

Source: `helia_aot/cli/defines.py:505`

### helia_aot.cli.defines.ConvertArgs.operators

`attribute` · `python`

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

Operator attribute rules and
optimization knob overrides.

Source: `helia_aot/cli/defines.py:506`

### helia_aot.cli.defines.ConvertArgs.documentation

`attribute` · `python`

```python
documentation: DocumentationArgs = Field(default_factory=DocumentationArgs, description='Documentation configuration')
```

Documentation configuration.

Source: `helia_aot/cli/defines.py:518`

### helia_aot.cli.defines.ConvertArgs.optimization

`attribute` · `python`

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

Optimization goal, approximation
gate and knobs.

Source: `helia_aot/cli/defines.py:521`

### helia_aot.cli.defines.ConvertArgs.verbose

`attribute` · `python`

```python
verbose: int = Field(1, ge=0, le=3, description='Verbosity level')
```

Verbosity level (0-3).

Source: `helia_aot/cli/defines.py:524`

### helia_aot.cli.defines.ConvertArgs.force

`attribute` · `python`

```python
force: bool = Field(False, description='Force conversion even if output exists')
```

Source: `helia_aot/cli/defines.py:525`

### helia_aot.cli.defines.ConvertArgs.keep_work_dir

`attribute` · `python`

```python
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.

Source: `helia_aot/cli/defines.py:526`

### helia_aot.cli.defines.ConvertArgs.log_file

`attribute` · `python`

```python
log_file: Path | None = Field(None, description='Optional log file path')
```

Optional log file path.

Source: `helia_aot/cli/defines.py:527`

### helia_aot.cli.defines.ConvertArgs.operator_rules

`method` · `python`

```python
operator_rules() -> list[AttributeRuleset]
```

Return the operator attribute rules, without optimization knobs.

**Returns**

| Name | Type | Description |
| --- | --- | --- |
|  | list[AttributeRuleset] | list[AttributeRuleset]: The rules to resolve operator attributes from. |

Source: `helia_aot/cli/defines.py:529`

### helia_aot.cli.defines.ConvertArgs.knob_rules

`method` · `python`

```python
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**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| include_model_knobs | bool | True | Lead with the model-wide knob rule. |

**Returns**

| Name | Type | Description |
| --- | --- | --- |
|  | list[AttributeRuleset] | list[AttributeRuleset]: Rules whose attributes are knob values. |

Source: `helia_aot/cli/defines.py:539`

### helia_aot.cli.defines.ConvertArgs.model_knob_values

`method` · `python`

```python
model_knob_values() -> dict[str, str]
```

Return the model-wide value of every knob, ``auto`` where unset.

Source: `helia_aot/cli/defines.py:558`

### helia_aot.cli.defines.ConvertArgs.explicit_model_knobs

`method` · `python`

```python
explicit_model_knobs() -> frozenset[str]
```

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

Source: `helia_aot/cli/defines.py:562`

### helia_aot.cli.defines.ConvertArgs.operator_knob_rules

`method` · `python`

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

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

**Returns**

| Name | Type | Description |
| --- | --- | --- |
|  | 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. |

Source: `helia_aot/cli/defines.py:566`

### helia_aot.cli.defines.ConvertArgs.from_yaml

`method` · `python`

```python
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**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| path | str \| Path | Required | Path to a YAML mapping of conversion options. |

**Returns**

| Name | Type | Description |
| --- | --- | --- |
|  | ConvertArgs | The validated configuration; unknown nested keys warn as usual. |

**Raises**

| Name | Description |
| --- | --- |
| FileNotFoundError | If ``path`` does not exist. |
| ValueError | If the file is not a YAML mapping. |

Source: `helia_aot/cli/defines.py:584`
