> 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.launcher

## Module Contents

### Classes

| Name                                                                                       | Description                                  |
| ------------------------------------------------------------------------------------------ | -------------------------------------------- |
| [`NemoRunLauncher`](#nemo_automodel-components-launcher-nemo_run-launcher-NemoRunLauncher) | Launch a recipe via NeMo-Run's executor API. |

### Data

[`_CONFIG_FILENAME`](#nemo_automodel-components-launcher-nemo_run-launcher-_CONFIG_FILENAME)

[`_REMOTE_CONFIG_PATH`](#nemo_automodel-components-launcher-nemo_run-launcher-_REMOTE_CONFIG_PATH)

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

### API

```python
class nemo_automodel.components.launcher.nemo_run.launcher.NemoRunLauncher()
```

**Bases:** [Launcher](/nemo-automodel/nemo_automodel/components/launcher/base#nemo_automodel-components-launcher-base-Launcher)

Launch a recipe via NeMo-Run's executor API.

Supports loading pre-configured executors from `$NEMORUN_HOME/executors.py`
(or a custom path) and submitting jobs as `nemo_run.Script` objects.
Works with any NeMo-Run executor backend (Slurm, Kubernetes, Docker, local).

Uses NeMo-Run's native `Torchrun` launcher so that distributed training
arguments (rendezvous, node rank, nproc-per-node) are managed automatically.
The training config YAML is packaged via `PatternPackager` so it is
available at `/nemo_run/code/automodel_config.yaml` inside the container.

```python
nemo_automodel.components.launcher.nemo_run.launcher.NemoRunLauncher._configure_torchrun(
    executor: typing.Any,
    devices: int
) -> None
```

staticmethod

Enable the native NeMo-Run Torchrun launcher on *executor*.

Sets `executor.launcher = "torchrun"` and
`torchrun_nproc_per_node` so NeMo-Run generates the correct
`torchrun --nproc-per-node=&lt;N&gt;` invocation in the sbatch script.

```python
nemo_automodel.components.launcher.nemo_run.launcher.NemoRunLauncher._resolve_executor(
    nr_config: nemo_automodel.components.launcher.nemo_run.config.NemoRunConfig
) -> typing.Any
```

Load a named executor or build a local one.

```python
nemo_automodel.components.launcher.nemo_run.launcher.NemoRunLauncher._setup_packager(
    executor: typing.Any,
    config_path: str
) -> None
```

staticmethod

Configure a `PatternPackager` that ships the config YAML.

The packager tars the config file and NeMo-Run extracts it into
`&#123;job_dir&#125;/code/`, which is mounted at `/nemo_run/code/` inside
the container.

```python
nemo_automodel.components.launcher.nemo_run.launcher.NemoRunLauncher.launch(
    config: typing.Dict[str, typing.Any],
    config_path: pathlib.Path,
    recipe_target: str,
    launcher_config: typing.Dict[str, typing.Any],
    extra_args: typing.Optional[typing.List[str]] = None
) -> int
```

```python
nemo_automodel.components.launcher.nemo_run.launcher._CONFIG_FILENAME = 'automodel_config.yaml'
```

```python
nemo_automodel.components.launcher.nemo_run.launcher._REMOTE_CONFIG_PATH = f'/nemo_run/code/{_CONFIG_FILENAME}'
```

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