> This page is for version 0.5.0 · 26.06.
> For other versions, use one of these documentation indexes:
> - Nightly (default): https://docs.nvidia.com/nemo/automodel/nightly/llms.txt
> - Latest: https://docs.nvidia.com/nemo/automodel/latest/llms.txt
> - 0.5.0 · 26.06: https://docs.nvidia.com/nemo/automodel/v0.5/llms.txt
> - 0.4.0 · 26.04: https://docs.nvidia.com/nemo/automodel/v0.4/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# nemo_automodel.components.launcher.nemo_run.utils

## Module Contents

### Functions

| Name                                                                                                    | Description                                                            |
| ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [`apply_overrides`](#nemo_automodel-components-launcher-nemo_run-utils-apply_overrides)                 | Apply YAML overrides to an executor via `setattr`.                     |
| [`load_executor_from_file`](#nemo_automodel-components-launcher-nemo_run-utils-load_executor_from_file) | Load a named executor from a Python file containing an `EXECUTOR_MAP`. |
| [`submit_nemo_run_job`](#nemo_automodel-components-launcher-nemo_run-utils-submit_nemo_run_job)         | Submit a job via NeMo-Run's Experiment API.                            |

### Data

[`logger`](#nemo_automodel-components-launcher-nemo_run-utils-logger)

### API

```python
nemo_automodel.components.launcher.nemo_run.utils.apply_overrides(
    executor: typing.Any,
    overrides: dict
) -> None
```

Apply YAML overrides to an executor via `setattr`.

Dict and list values are *merged* with existing executor attributes
(dicts are updated, lists are extended).  All other values are set
directly.

**Parameters:**

**`executor`** `Any`

Executor instance to configure, from `EXECUTOR_MAP`.

---

**`overrides`** `dict`

Attribute name to value, collected by
`NemoRunConfig.from_dict` from the unrecognised keys of the
`nemo_run:` YAML section.

---

**Raises:**

* `ValueError`: If `executor` has no attribute named by one of the keys.
  NeMo-Run executors are dataclasses with fixed fields, so assigning an
  unknown name would create an attribute the scheduler never reads,
  leaving the field the user meant to set at its default.

```python
nemo_automodel.components.launcher.nemo_run.utils.load_executor_from_file(
    name: str,
    executors_file: str
) -> typing.Any
```

Load a named executor from a Python file containing an `EXECUTOR_MAP`.

The file (typically `$NEMORUN_HOME/executors.py`) must define a module-level
`EXECUTOR_MAP` dictionary whose keys are executor names and whose values
are pre-built `nemo_run` executor instances (or zero-arg callables that
return one).

**Parameters:**

**`name`** `str`

Key to look up in `EXECUTOR_MAP`.

---

**`executors_file`** `str`

Absolute path to the Python file.

---

**Returns:** `Any`

The executor object.

**Raises:**

* `FileNotFoundError`: If *executors\_file* does not exist.
* `KeyError`: If *name* is not found in the `EXECUTOR_MAP`.

```python
nemo_automodel.components.launcher.nemo_run.utils.submit_nemo_run_job(
    script: typing.Any,
    executor: typing.Any,
    job_name: str,
    detach: bool,
    tail_logs: bool
) -> int
```

Submit a job via NeMo-Run's Experiment API.

**Parameters:**

**`script`** `Any`

A `nemo_run.Script` object.

---

**`executor`** `Any`

A NeMo-Run executor instance.

---

**`job_name`** `str`

Experiment and task name.

---

**`detach`** `bool`

If True, return immediately after submission.

---

**`tail_logs`** `bool`

If True, stream logs after submission.

---

**Returns:** `int`

0 on successful submission.

```python
nemo_automodel.components.launcher.nemo_run.utils.logger = logging.getLogger(__name__)
```