X-PLUG / mPLUG-Owl

mPLUG-Owl: The Powerful Multi-modal Large Language Model Family
https://www.modelscope.cn/studios/damo/mPLUG-Owl
MIT License
2.33k stars 176 forks source link

VSCode运行原始代码报错,No module named 'mplug_owl' #67

Closed Yimi81 closed 1 year ago

Yimi81 commented 1 year ago

报错复现:

  1. git clone https://github.com/X-PLUG/mPLUG-Owl.git
  2. 配置环境
  3. bash scripts/train_it.sh

无其它改动

报错如下 Note that --use_env is set by default in torchrun. If your script expects --local_rank argument to be set, please change it to read from os.environ['LOCAL_RANK'] instead. See https://pytorch.org/docs/stable/distributed.html#launch-utility for further instructions

warnings.warn( Traceback (most recent call last): File "/home/xxx/projects/mPLUG-Owl/./pipeline/train.py", line 15, in from mplug_owl import MplugOwlForConditionalGeneration, MplugOwlTokenizer ModuleNotFoundError: No module named 'mplug_owl'

Yimi81 commented 1 year ago

已解决,遗漏了设置环境变量PYTHONPATH=./

JeffRody commented 4 months ago

import sys sys.path.append('./DocOwl1.5-Omni/mplug_docowl') print(sys.path)