Traceback (most recent call last):
File "/root/anaconda3/envs/vllm/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/root/anaconda3/envs/vllm/lib/python3.9/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "FlagEmbedding/FlagEmbedding/baai_general_embedding/finetune/__init__.py", line 2, in
from .trainer import BiTrainer
File "FlagEmbedding/FlagEmbedding/baai_general_embedding/finetune/trainer.py", line 2, in
from transformers.trainer import *
File "/root/anaconda3/envs/vllm/lib/python3.9/site-packages/transformers/trainer.py", line 165, in
from apex import amp
File "/root/anaconda3/envs/vllm/lib/python3.9/site-packages/apex/__init__.py", line 13, in
from pyramid.session import UnencryptedCookieSessionFactoryConfig
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
解决方法:
git clone https://github.com/NVIDIA/apex
cd apex
python setup.py install
参考资料:
https://github.com/jeonsworld/ViT-pytorch/issues/23