环境:python3.10 、conda 4.5.11
python ./cogagent_model_worker.py --host 0.0.0.0 --port 40000 --from_pretrained "saved_models/cogagent-chat" --bf16 --max_length 2048
报错:
[2024-11-16 18:23:52,527] [INFO] [real_accelerator.py:219:get_accelerator] Setting ds_accelerator to cuda (auto detect)
Traceback (most recent call last):
File "/media/wldst/3ECAD1AECAD162A7/liuqiang/repo/ScreenAgent/train/./cogagent_model_worker.py", line 17, in <module>
from sat.model.mixins import CachedAutoregressiveMixin
File "/home/wldst/anaconda3/envs/cogAgent/lib/python3.10/site-packages/sat/__init__.py", line 12, in <module>
raise e
File "/home/wldst/anaconda3/envs/cogAgent/lib/python3.10/site-packages/sat/__init__.py", line 6, in <module>
from .training.deepspeed_training import training_main
File "/home/wldst/anaconda3/envs/cogAgent/lib/python3.10/site-packages/sat/training/deepspeed_training.py", line 28, in <module>
import wandb
ModuleNotFoundError: No module named 'wandb'
pip install wandb
Please 'pip install apex'
[2024-11-16 18:26:59,277] [WARNING] Failed to load bitsandbytes:No module named 'bitsandbytes'
pip install apex'
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
pip install --upgrade pyramid
# /home/wldst/anaconda3/envs/cogAgent/lib/python3.10/site-packages/apex/__init__.py # 删除或注释掉错误的导入语句 # from pyramid.session import UnencryptedCookieSessionFactoryConfig
ImportError: cannot import name 'implements' from 'zope.interface'
Failed to load bitsandbytes:No module named 'bitsandbytes'
ImportError: cannot import name 'implements' from 'zope.interface' (/home/wldst/anaconda3/envs/cogAgent/lib/python3.10/site-packages/zope/interface/__init__.py)最后问题卡在这里了。