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

ModuleNotFoundError: No module named 'xtuner.parallel' #139

Closed
starlitsky2010 opened this issue Apr 3, 2024 · 3 comments
Closed

ModuleNotFoundError: No module named 'xtuner.parallel' #139

starlitsky2010 opened this issue Apr 3, 2024 · 3 comments

Comments

@starlitsky2010
Copy link

I met this problem when test by cmd:
torchrun --nproc-per-node=8 --nnodes=1 --node_rank=0 --master_addr 10.255.244.33 --master_port 8109 run.py --data LLaVABench --model llava-internlm2-20b --verbose

Traceback (most recent call last):
File "/code/src/VLMEvalKit/run.py", line 153, in
main()
File "/code/src/VLMEvalKit/run.py", line 83, in main
model = infer_data_job(
File "/code/src/VLMEvalKit/vlmeval/inference.py", line 210, in infer_data_job
model = infer_data(
File "/code/src/VLMEvalKit/vlmeval/inference.py", line 142, in infer_data
response = model.generate(prompt=struct['text'], image_path=struct['image'], dataset=dataset_name)
File "/code/src/VLMEvalKit/vlmeval/vlm/llava_xtuner.py", line 177, in generate
from xtuner.model.utils import prepare_inputs_labels_for_multimodal
File "/usr/local/lib/python3.10/dist-packages/xtuner/model/init.py", line 3, in
from .sft import SupervisedFinetune
File "/usr/local/lib/python3.10/dist-packages/xtuner/model/sft.py", line 16, in
from xtuner.parallel.sequence import (get_sequence_parallel_world_size,
ModuleNotFoundError: No module named 'xtuner.parallel'
[2024-04-03 03:58:31,981] torch.distributed.elastic.multiprocessing.api: [ERROR] failed (exitcode: 1) local_rank: 0 (pid: 2207729) of binary: /bin/python

@kennymckormick
Copy link
Member

Did you install the latest version of xtuner? We recommend you to install xtuner from the source code (latest main branch at https://github.com/InternLM/xtuner).
BTW, do you have any idea on the potential reason of this error @LZHgrla

@LZHgrla
Copy link
Contributor

LZHgrla commented Apr 9, 2024

@starlitsky2010 Hi!

There are some bugs on pypi package of xtuner==0.1.16.

Install xtuner>=0.1.17 can solve this issue.

pip install 'xtuner>=0.1.17'

@starlitsky2010
Copy link
Author

Did you install the latest version of xtuner? We recommend you to install xtuner from the source code (latest main branch at https://github.com/InternLM/xtuner). BTW, do you have any idea on the potential reason of this error @LZHgrla

I used xtuner==0.1.15 and that fixes it. Thanks

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

No branches or pull requests

3 participants