Skip to content

fix: Raise informative error in MegatronPretraining if no glob paths found - #803

Merged
adil-a merged 2 commits into
NVIDIA-NeMo:mainfrom
jrbourbeau:raise-early-no-paths
Nov 15, 2025
Merged

adil-a merged 2 commits into
NVIDIA-NeMo:mainfrom
jrbourbeau:raise-early-no-paths

Conversation

@jrbourbeau

@jrbourbeau jrbourbeau commented Nov 14, 2025 •

Copy link
Copy Markdown
Member

I accidentally had a bad glob path and got a confusing error here

raw_weight_per_dataset, raw_prefix_per_dataset = zip(
*[(blend[i], blend[i + 1]) for i in range(0, len(blend), 2)]
)

when attempting to zip an empty list (the list was only empty because of the glob path not being correct).

This PR raises an informative error early on for the case that no glob paths are found.

EDIT: The particular case I was running was the pretraining example

uv run torchrun --nproc-per-node=2 examples/llm_pretrain/pretrain.py --config examples/llm_pretrain/megatron_pretrain_gpt2.yaml

where I didn't have the fineweb dataset downloaded locally

Signed-off-by: James Bourbeau <jbourbeau@nvidia.com>
@jrbourbeau jrbourbeau changed the title Raise informative error in MegatronPretraining if no glob paths found fix: Raise informative error in MegatronPretraining if no glob paths found Nov 14, 2025
@copy-pr-bot

copy-pr-bot Bot commented Nov 14, 2025

Copy link
Copy Markdown

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.

@adil-a

adil-a commented Nov 14, 2025

Copy link
Copy Markdown
Collaborator

/ok to test 7d29da7

@adil-a

adil-a commented Nov 14, 2025

Copy link
Copy Markdown
Collaborator

Thanks a lot for the fix @jrbourbeau !

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for reviewing and adding a test @adil-a!

@adil-a
adil-a merged commit 5034482 into NVIDIA-NeMo:main Nov 15, 2025
71 of 73 checks passed
chtruong814 pushed a commit that referenced this pull request Nov 15, 2025
…ths found (#803)

Signed-off-by: James Bourbeau <jbourbeau@nvidia.com>
Co-authored-by: adil-a <adil.asif2000@hotmail.com>
Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
@jrbourbeau
jrbourbeau deleted the raise-early-no-paths branch November 17, 2025 15:57
linnanwang pushed a commit that referenced this pull request Apr 24, 2026
…ths found (#803)

Signed-off-by: James Bourbeau <jbourbeau@nvidia.com>
Co-authored-by: adil-a <adil.asif2000@hotmail.com>
kashif pushed a commit to kashif/Automodel that referenced this pull request May 25, 2026
…ths found (NVIDIA-NeMo#803)

Signed-off-by: James Bourbeau <jbourbeau@nvidia.com>
Co-authored-by: adil-a <adil.asif2000@hotmail.com>

This branch was previously deployed

2 inactive deployments
nemo-ci — 7d29da71 Deployed Nov 15, 2025 by copy-pr-bot[bot] via L2_HF_Transformer_LLM #2522
test — 7d29da71 Deployed Nov 14, 2025 by copy-pr-bot[bot] via cicd-wait-in-queue #2522
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-request external r0.2.0 Add for cherry-pick into release branch 0.2.0 x-databricks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants