RuntimeError cannot import name 'compare_version' from torchmetrics.utilities.imports
RuntimeError cannot import name ‘compare_version’ from torchmetrics.utilities.imports
1、RuntimeError: cannot import name ‘_compare_version’ from ‘torchmetrics.utilities.imports’
需要降级一下torchmetrics包,运行
conda install torchmetrics==0.11.4
2、orch is not able to use GPU; add –skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
说明torch的版本与cuda版本冲突,此时pytorch并不能使用GPU。
执行下面指令
python
import torch
torch.cuda.is_available()
会输出False
这时候可以试着从pytorch官网复制对应版本指令重新安装一遍torch,
如果还不行的话就再建虚拟环境重新跑一遍脚本
3 执行bash start.sh的时候卡在 installing clip
先执行
pip install clip
再执行一遍bash start.sh
4 执行bash start.sh的时候卡在 installing open_clip
先执行
pip install open_clip_torch
再执行一遍bash start.sh
本博客所有文章除特别声明外,均采用 null 许可协议。转载请注明来自 糖果AIGC实验室-LUA!