nemo_automodel.cli.app
nemo_automodel.cli.app
Unified CLI entry-point for NeMo AutoModel.
Usage
::
Recommended — the CLI handles torchrun internally:
automodel <config.yaml> [—nproc-per-node N] [—key.subkey=override …]
Also supported — external torchrun launch:
torchrun —nproc-per-node N -m nemo_automodel.cli.app <config.yaml> [—key.subkey=override …]
Convenience wrapper for development (not installed):
python app.py <config.yaml> [—nproc-per-node N] [—key.subkey=override …]
The YAML config must specify which recipe class to instantiate. All three forms are accepted::
recipe: TrainFinetuneRecipeForNextTokenPrediction # bare class name recipe: nemo_automodel.recipes.llm.train_ft.TrainFin… # fully-qualified recipe: target: nemo_automodel.recipes.llm.train_ft.Trai… # Hydra-style
For SLURM clusters, use sbatch slurm.sub directly (see the reference
script at the repo root). Add a skypilot: or nemo_run: section
in the YAML for those launchers.
When launched via torchrun, the CLI detects the existing distributed
environment and runs the recipe in-process on each worker instead of
re-spawning torchrun.
Module Contents
Functions
Data
API
Build the CLI argument parser.
Returns: argparse.ArgumentParser
argparse.ArgumentParser
CLI for running recipes with NeMo-AutoModel.
Supports interactive (local), SkyPilot, and NeMo-Run launchers.
For SLURM, use sbatch slurm.sub directly.
Returns:
Job’s exit code.