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

## Module Contents

### Classes

| Name                                                                                         | Description                                                               |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [`InteractiveLauncher`](#nemo_automodel-components-launcher-interactive-InteractiveLauncher) | Launch a recipe locally on the current node using torchrun or in-process. |

### Functions

| Name                                                                                         | Description                                                          |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`_get_repo_root`](#nemo_automodel-components-launcher-interactive-_get_repo_root)           | Return the repository root.  If CWD looks like an editable checkout, |
| [`_recipe_module_path`](#nemo_automodel-components-launcher-interactive-_recipe_module_path) | Convert a dotted recipe target into an absolute filesystem path.     |
| [`resolve_recipe_cls`](#nemo_automodel-components-launcher-interactive-resolve_recipe_cls)   | Import and return the recipe class from a dotted path.               |

### Data

[`_INSTALL_MSG`](#nemo_automodel-components-launcher-interactive-_INSTALL_MSG)

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

### API

```python
class nemo_automodel.components.launcher.interactive.InteractiveLauncher()
```

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

Launch a recipe locally on the current node using torchrun or in-process.

```python
nemo_automodel.components.launcher.interactive.InteractiveLauncher._is_torchrun_worker() -> bool
```

staticmethod

Return True when this process was already spawned by torchrun.

torchrun (`torch.distributed.run`) sets both `LOCAL_RANK` and
`TORCHELASTIC_RUN_ID` in the environment of every worker it spawns.
We check for both to avoid false positives from environments (e.g.
SLURM) that may set `LOCAL_RANK` without an active torchrun session.

When the user launches the CLI via
`torchrun --nproc-per-node N -m nemo_automodel.cli.app config.yaml`,
each worker must run the recipe in-process instead of re-launching torchrun.

```python
nemo_automodel.components.launcher.interactive.InteractiveLauncher._run_recipe_in_process(
    recipe_target: str,
    config: typing.Dict[str, typing.Any]
) -> int
```

Instantiate and run a recipe in the current process.

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

```python
nemo_automodel.components.launcher.interactive._get_repo_root() -> pathlib.Path
```

Return the repository root.  If CWD looks like an editable checkout,
prepend it to `PYTHONPATH` so the local source takes precedence.

```python
nemo_automodel.components.launcher.interactive._recipe_module_path(
    recipe_target: str,
    repo_root: pathlib.Path
) -> pathlib.Path
```

Convert a dotted recipe target into an absolute filesystem path.

```python
nemo_automodel.components.launcher.interactive.resolve_recipe_cls(
    target_str: str
)
```

Import and return the recipe class from a dotted path.

"  pip install nemo-automodel          # CPU/basic
"
"  pip install nemo-automodel\[all]     # with CUDA & all extras

"

```python
nemo_automodel.components.launcher.interactive._INSTALL_MSG = 'Local/interactive execution requires PyTorch and the full nemo_automodel packag...
```

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