Curator icon indicating copy to clipboard operation
Curator copied to clipboard

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

Open pablo-garay opened this issue 11 months ago • 7 comments

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)

pablo-garay avatar Dec 19 '25 07:12 pablo-garay

I don't think deduplication_cuda12 or text_cuda12 needs flash attn. From the uv.lock file it wasn't immediately clear to me where it comes from for those optionals.

@pablo-garay how are other libraries that depend on flash-attn working around this?

ayushdg avatar Dec 19 '25 15:12 ayushdg

ack

pablo-garay avatar Dec 25 '25 19:12 pablo-garay

Potential solution: install torch vefore flash attn

pablo-garay avatar Dec 25 '25 19:12 pablo-garay

@lbliii can we document this and close the issue once doc is added?

sithape2025 avatar Jan 06 '26 19:01 sithape2025

this should be resolved now? @thomasdhc can you verify?

arhamm1 avatar May 28 '26 19:05 arhamm1

Hi, I'd like to work on this. I'll submit a PR shortly.

nightcityblade avatar Aug 08 '26 03:08 nightcityblade

I rechecked this against current main before changing anything. flash-attn is no longer a direct Curator dependency (removed in #2107), and the current release notes and 26.07 migration guide already document that it is not installed by the CUDA extras. Since the original build failure no longer applies to the current dependency set, I'm releasing my claim rather than submitting redundant documentation.

nightcityblade avatar Aug 08 '26 03:08 nightcityblade