pytorch 代码在 colab 上突然失败,你的系统上的 NVIDIA 驱动程序太旧了

bho*_*ass 4 pytorch google-colaboratory

不久前,我有一些在 colab(gpu 运行时)上运行的代码。突然我得到

您系统上的 NVIDIA 驱动程序太旧(发现版本 10010)。

nvcc 显示 Cuda 编译工具,版本 10.1,V10.1.243

我尝试了火炬版本 1.5.1,然后是 1.13.0。两者都不断收到此错误。

有一个讨论表明其他人有疑问。没有明确的解决办法。 https://github.com/pytorch/pytorch/issues/27738

有人有同样的问题吗?

小智 7

light-the-torch 封装旨在解决此类问题。尝试这个:

!pip install light-the-torch
!ltt install torch torchvision
Run Code Online (Sandbox Code Playgroud)

  • 可惜没有效果 (2认同)

luc*_*rot 0

我刚刚在 google colab 上遇到了同样的问题。在这个 github 问题之后,我降级为torch==1.4.0使用!pip.

由于我还有其他几个要求,我正在从本地文件中读取它们,如下所示:

with open('attribute_hallucination/editing_tool/requirements.txt', 'w') as f:
  f.write("cupy-cuda101==7.4.0\ncycler==0.10.0\nfastrlock==0.4\nfuture==0.18.2\nimageio==2.8.0\njoblib==0.14.1\nkiwisolver==1.2.0\nmatplotlib==3.2.1\nnumpy==1.18.4\nopencv-python==4.2.0.34\nPillow==7.1.2\npynvrtc==9.2\npyparsing==2.4.7\npython-dateutil==2.8.1\nscikit-learn==0.22.2.post1\nscipy==1.2.0\nsix==1.14.0\nsklearn==0.0\ntorch==1.4.0\ntorchvision==0.6.0\ntqdm==4.46.0")
!pip install -r attribute_hallucination/editing_tool/requirements.txt
Run Code Online (Sandbox Code Playgroud)