FlagAI icon indicating copy to clipboard operation
FlagAI copied to clipboard

ModuleNotFoundError: No module named 'torch._six'

Open shuyhere opened this issue 2 years ago • 1 comments

System Info

wsl系统 torch=2.0.1 运行aquila-7b测试脚本时候报错

Information

  • [X] The official example scripts
  • [ ] My own modified scripts

Tasks

  • [X] An officially supported task in the examples folder (such as T5/AltCLIP, ...)
  • [ ] My own task or dataset (give details below)

Reproduction

File "/root/miniconda3/envs/flagai/lib/python3.10/site-packages/flagai/mpu/grads.py", line 23, in from torch._six import inf

更改相关文件为 from torch import inf 正常运行

Expected behavior

更改相关文件为 from torch import inf 正常运行

shuyhere avatar Jun 12 '23 06:06 shuyhere

我们在最新的1.7.1版本解决了这个问题,这个是torch的版本原因,2.0之后torch._six就没有了

BAAI-OpenPlatform avatar Jun 13 '23 02:06 BAAI-OpenPlatform