Skip to content

Conversation

@ruidazeng
Copy link
Contributor

@ruidazeng ruidazeng commented Feb 27, 2025

What does this PR do?

Torch and numpy is required. Otherwise the environment setup step would not work with the following errors.

  Using cached flash_attn-2.6.3.tar.gz (2.6 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-czmbtsja/flash-attn_277c05d6c59542f493f8d782da9c985a/setup.py", line 21, in <module>
          import torch
      ModuleNotFoundError: No module named 'torch'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

pip install -r requirements.txt also needs to happen before pip install .[flash-attn], and is added to the README.

Copy link
Collaborator

@Dornavineeth Dornavineeth left a comment

Choose a reason for hiding this comment

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

Thanks for your attention to our work and raising a PR. Can you please fix it as per the comments and raise a PR?

TIP: While raising a PR in future, please instali in dev mode pip install .[dev]

This additionally installs pre-commit package which helps to format your code before commiting.

@Dornavineeth Dornavineeth merged commit e131b4d into locuslab:main Feb 28, 2025
1 check passed
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.

3 participants