ColossalAI
ColossalAI copied to clipboard
[BUG]: ModuleNotFoundError: No module named 'colossalai._analyzer'
๐ Describe the bug
command
git clone https://github.com/hpcaitech/ColossalAI.git
cd ColossalAI
# install colossalai
pip install .
# install chat
cd applications/Chat
pip install .
git clone https://github.com/hpcaitech/transformers
cd transformers
pip install .
cd ../examples
# train
torchrun --standalone --nproc_per_node=4 train_sft.py \
--pretrain "./LLaMa-7B" \
--model 'llama' \
--strategy colossalai_zero2 \
--log_interval 10 \
--save_path ./Coati-7B \
--dataset ./dataset/instinwild_en.json \
--batch_size 4 \
--accimulation_steps 8 \
--lr 2e-5 \
--max_datasets_size 512 \
--max_epochs 1
result
Traceback (most recent call last):
File "/root/ColossalAI/applications/Chat/examples/train_sft.py", line 7, in
Environment
CUDA 11.0 cuDNN 8 Python 3.9 Pytorch 1.13.1+cu117
Worked yesterday for me, stopped working today.
Workaround : git checkout e6a132a449d10489e65544e77f49190e2817b587 Use the commit from yesterday and it works, I guess an update broke the code.
Meeted the same problem too. You need to checkout the old version which is around yesterday morning or before.
Yes, the source code is not stable until an official release.
ๆ้่ฟๅคๅถcolossalai/_analyzer ๅฐsite-packages/colossalai/ ่งฃๅณไบ่ฟไธช้ฎ้ข cp -r _analyzer/ /path/to/site-packages/colossalai/
Bot detected the issue body's language is not English, translate it automatically. ๐ฏ๐ญ๐ป๐งโ๐คโ๐ง๐ซ๐ง๐ฟโ๐คโ๐ง๐ป๐ฉ๐พโ๐คโ๐จ๐ฟ๐ฌ๐ฟ
I solved this problem by copying colossalai/_analyzer to site-packages/colossalai/ cp -r _analyzer/ /path/to/site-packages/colossalai/
I will try to fix this bug today.
same question
Bot detected the issue body's language is not English, translate it automatically. ๐ฏ๐ญ๐ป๐งโ๐คโ๐ง๐ซ๐ง๐ฟโ๐คโ๐ง๐ป๐ฉ๐พโ๐คโ๐จ๐ฟ๐ฌ๐ฟ
same question
Please does anyone get any specific advice on how to solve this import error?
Please does anyone get any specific advice on how to solve this import error?
ๆ้่ฟๅคๅถcolossalai/_analyzer ๅฐsite-packages/colossalai/ ่งฃๅณไบ่ฟไธช้ฎ้ข cp -r _analyzer/ /path/to/site-packages/colossalai/
I refer to the above solution and it can now run normally, but I always feel that this method is not very friendly
Many thanks, it works now.
ๆ้่ฟๅคๅถcolossalai/_analyzer ๅฐsite-packages/colossalai/ ่งฃๅณไบ่ฟไธช้ฎ้ข cp -r _analyzer/ /path/to/site-packages/colossalai/
awesome!
Bot detected the issue body's language is not English, translate it automatically. ๐ฏ๐ญ๐ป๐งโ๐คโ๐ง๐ซ๐ง๐ฟโ๐คโ๐ง๐ป๐ฉ๐พโ๐คโ๐จ๐ฟ๐ฌ๐ฟ
I solved this problem by copying colossalai/_analyzer to site-packages/colossalai/ cp -r _analyzer/ /path/to/site-packages/colossalai/
awesome!
any progress?