Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install (as per docs) fails with ModuleNotFoundError: No module named 'axolotl' #945

Closed
6 of 8 tasks
nick-verida opened this issue Dec 12, 2023 · 11 comments
Closed
6 of 8 tasks
Assignees
Labels
bug Something isn't working

Comments

@nick-verida
Copy link

Please check that this issue hasn't been reported before.

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

When installing just using pip via the command in the docs:

pip3 install "axolotl[flash-attn,deepspeed] @ git+https://github.com/OpenAccess-AI-Collective/axolotl"

Current behaviour

/home/nlothian/axolotl/venv/bin/python3: Error while finding module specification for 'axolotl.cli.train' (ModuleNotFoundError: No module named 'axolotl')
Traceback (most recent call last):
  File "/home/nlothian/axolotl/venv/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/home/nlothian/axolotl/venv/lib/python3.9/site-packages/accelerate/commands/accelerate_cli.py", line 47, in main
    args.func(args)
  File "/home/nlothian/axolotl/venv/lib/python3.9/site-packages/accelerate/commands/launch.py", line 994, in launch_command
    simple_launcher(args)
  File "/home/nlothian/axolotl/venv/lib/python3.9/site-packages/accelerate/commands/launch.py", line 636, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/home/nlothian/axolotl/venv/bin/python3', '-m', 'axolotl.cli.train', 'examples/openllama-3b/lora.yml']' returned non-zero exit status 1.

Others are seeing the same behavior: https://discord.com/channels/1104757954588196865/1111279858136383509/1164806862508666900

Steps to reproduce

Install via pip:

pip3 install "axolotl[flash-attn,deepspeed] @ git+https://github.com/OpenAccess-AI-Collective/axolotl"

However cloning the repo and installing that seems to get further:

git clone https://github.com/OpenAccess-AI-Collective/axolotl
cd axolotl

pip3 install packaging
pip3 install -e '.[flash-attn,deepspeed]'

Config yaml

No response

Possible solution

No response

Which Operating Systems are you using?

  • Linux
  • macOS
  • Windows

Python Version

3.10

axolotl branch-commit

main/7fabc4d

Acknowledgements

  • My issue title is concise, descriptive, and in title casing.
  • I have searched the existing issues to make sure this bug has not been reported yet.
  • I am using the latest version of axolotl.
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.
@nick-verida nick-verida added the bug Something isn't working label Dec 12, 2023
@opyate
Copy link

opyate commented Dec 13, 2023

Duplicate of #910 ?

@nick-verida
Copy link
Author

Duplicate of #910 ?

Probably the same underlying issue but the error message is subtly different:

(ModuleNotFoundError: No module named 'axolotl') vs (ModuleNotFoundError: No module named 'axolotl.cli')

Unclear why this is the case.

@NanoCode012
Copy link
Collaborator

May I ask if docker works? Alternatively, could you try create a new conda/pip venv again?

@ajinkya123-robo
Copy link

Just running pip3 install -e '.[flash-attn,deepspeed]' once again in my venv solved the issue.

@Speedway1
Copy link

Actually the docs are wrong. You need to git clone the repo, then cd into the repo. Then do
pip install -e '.[flash-attn,deepspeed]'

and you will almost certainly need:
pip install --upgrade flash_attn

@JesseGuerrero
Copy link

I am having this same issue. I looked at other issue reports and haven't found a solution yet

@winglian
Copy link
Collaborator

Axolotl needs to be installed from source by GitHub cloning the repository currently. We have dependencies that aren't packages currently so we can't push axolotl as a pypi package currently

@fozziethebeat
Copy link
Contributor

Is there any plan to support installing Axolotl without cloning the repository or is that a fundamental limitation?

@NanoCode012
Copy link
Collaborator

NanoCode012 commented Mar 13, 2024

Edit: This is incorrect. See comment below: #945 (comment)


@fozziethebeat , you can run it like this.

pip3 install "axolotl[flash-attn,deepspeed] @ git+https://github.com/OpenAccess-AI-Collective/axolotl"

@fozziethebeat
Copy link
Contributor

@NanoCode012 Interesting, that's what I'm doing (in a conda environment) but Axolotl isn't being found. When I check the environments site-packages I just see the axolotl-0.4.0.dist-info directory but not the actual package.

Running python -m axolotl.cli.preprocess gives me the disappointing

/home/fozziethebeat/anaconda3/envs/planar-ax/bin/python: Error while finding module specification for 'axolotl.cli.preprocess' (ModuleNotFoundError: No module named 'axolotl')

@NanoCode012
Copy link
Collaborator

Oh sorry, I did not read the earlier context. Hmm, it would seem that it's necessary to clone as per above discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants