NVIDIA-NeMo / NVIDIA-NeMo/Curator

Curator pip install: flash-attn build issue: ModuleNotFoundError: No module named 'torch'

Open
#1,333 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug community-request waiting-on-maintainers
Dominant language
Python
Stars
1.8k
Forks
328
Avg merge
4d 5h
Merged PRs (30d)
30

Description

This is expected behavior for the OPTIONAL pip job!
The error ModuleNotFoundError: No module named 'torch' is the known flash-attn build issue:

  • flash-attn's setup.py tries to import torch during build
  • But pip can't install build-time dependencies first
Image

pip job fails , while the required uv job passes (uv handles build deps via lockfile)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the optional pip job configuration and its flash-attn installation step; compare it with the required uv job, which passes. Determine whether the job should tolerate this known ModuleNotFoundError or handle the build-time dependency differently. Done when the expected behavior is documented or the optional pip job completes without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.