ColossalAI icon indicating copy to clipboard operation
ColossalAI copied to clipboard

[BUG]: ImportError: cannot import name 'register_meta' from 'torch._meta_registrations'

Open ZhangMaoTai opened this issue 2 years ago • 2 comments

🐛 Describe the bug

When I run https://github.com/hpcaitech/ColossalAI/blob/main/applications/Chat/examples/train_rm.sh, I encounter this import error.

File "/XXX/ColossalAI/colossalai/fx/_meta_regist_13.py", line 2, in from torch._meta_registrations import register_meta ImportError: cannot import name 'register_meta' from 'torch._meta_registrations' (/opt/conda/lib/python3.8/site-packages/torch/_meta_registrations.py)

Environment

The same as https://github.com/hpcaitech/ColossalAI/blob/main/applications/Chat/requirements.txt

ZhangMaoTai avatar Apr 06 '23 07:04 ZhangMaoTai

This bug occurs directly after I solve this bug https://github.com/hpcaitech/ColossalAI/issues/3447 using his methods

ZhangMaoTai avatar Apr 07 '23 07:04 ZhangMaoTai

hiii @ZhangMaoTai could you please pull the latest ColossalAI and try pip install -e ., and also ensure that you have enter ed the directory of Chat and pip install ., too.

Camille7777 avatar Apr 17 '23 07:04 Camille7777