Skip to content

refactor: CLI app and launching#1406

Merged
akoumpa merged 77 commits intomainfrom
akoumparouli/refactor_app_and_launching
Apr 1, 2026
Merged

refactor: CLI app and launching#1406
akoumpa merged 77 commits intomainfrom
akoumparouli/refactor_app_and_launching

Conversation

@akoumpa
Copy link
Copy Markdown
Contributor

@akoumpa akoumpa commented Feb 27, 2026

What does this PR do ?

Previously, running a job could be accomplished with three different ways:

  • using a script (recipe shim) under examples/<domain>_<task>/<task>.py -c config.yaml
  • using the recipe directly e.g., nemo_automodel/recipes/<domain>_<task>/<task>.py -c config.yaml
  • using the cli application e.g., automodel llm finetune -c config.yaml

The first two ways to run a job, provide direct access to the script being run, however, it's still too long to type, and similarly the automodel CLI had to use the "llm finetune" part to specify the recipe.

This PR refactors the job launching, and now, config.yaml lists the recipe to use. As a result, we can now run automodel config.yaml which is much easier to type than before. In addition, the python scripts under example/* will now be deprecated and instead users can use the automodel/am CLI application. Removal will happen in 26.06, with 26.04 still containing them with a deprecation message.

Example launch commands

Launch command What happens
python3 app.py config.yaml --nproc-per-node 8 LOCAL_RANK not set → detects 8 GPUs → launches torchrun internally → workers run the recipe script directly
python3 app.py config.yaml (single GPU) LOCAL_RANK not set → detects 1 GPU → runs recipe in-process
torchrun --nproc-per-node 8 app.py config.yaml torchrun spawns 8 workers → each enters app.py → LOCAL_RANK is set → runs recipe in-process (no nested torchrun)

The recommended command is to use app.py with python3, however, to avoid bad ux launching with torchrun is also supported.

Changelog

  • Add specific line by line info of high level changes in this PR.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?

If you haven't finished some of the above items you can still open "Draft" PR.

Additional Information

  • Related to # (issue)

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Feb 27, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
oot cause: nemo-run pins cryptography<43.0.0, but your project constrains cryptography>=46.0.5 (CVE fix). These are fundamentally incompatible, so uv lock can't resolve any extra that depends on nemo_run.
Fix:
Removed nemo_run from the cli extra -- it's now just ["pyyaml"]
Removed the standalone nemo-run extra entirely (it was also unresolvable)
Updated BREAKING_CHANGES.md, installation guide, and cluster guide to note that nemo-run should be installed separately (pip install nemo-run) if needed
The SLURM and k8s launchers don't need nemo-run at all (they shell out to sbatch/kubectl), and the NemoRunLauncher already does a runtime import check, so users who need it just install nemo-run directly.
@akoumpa akoumpa force-pushed the akoumparouli/refactor_app_and_launching branch from d5cd04a to 944138c Compare February 27, 2026 14:57
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Feb 27, 2026

/ok to test 203a148

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa akoumpa force-pushed the akoumparouli/refactor_app_and_launching branch from 203a148 to ffdadc3 Compare February 27, 2026 15:09
akoumpa and others added 2 commits February 27, 2026 15:09
Signed-off-by: akoumpa <akoumpa@users.noreply.github.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Feb 27, 2026

/ok to test 150e717

@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 30, 2026

/ok to test fc5ea89

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 30, 2026

/ok to test 00ca581

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 30, 2026

/ok to test 550c136

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 30, 2026

/ok to test d208597

@adil-a
Copy link
Copy Markdown
Collaborator

adil-a commented Mar 30, 2026

/claude review

Comment thread nemo_automodel/components/launcher/slurm/launcher.py Outdated
Comment thread examples/llm_finetune/finetune.py Outdated
Comment thread nemo_automodel/components/launcher/interactive.py Outdated
akoumpa and others added 3 commits March 30, 2026 13:13
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 30, 2026

/ok to test c507d8e

akoumpa added 3 commits March 30, 2026 14:07
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 30, 2026

/ok to test 5c6ccaa

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 30, 2026

/ok to test 164e4f1

@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 30, 2026

/claude review

Comment thread nemo_automodel/components/launcher/interactive.py
akoumpa and others added 2 commits March 31, 2026 15:09
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Mar 31, 2026

/ok to test 84ae1f8

adil-a
adil-a previously approved these changes Apr 1, 2026
Copy link
Copy Markdown
Collaborator

@adil-a adil-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks a lot

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Apr 1, 2026

/ok to test 85da4ee

@akoumpa
Copy link
Copy Markdown
Contributor Author

akoumpa commented Apr 1, 2026

already approved #1406, only change was in 85da4ee (minor) -> FM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants