首页 > 解决方案 > AlphaFold 内存不足错误,15 GB RAM 和 95 GB 磁盘空间未使用?

问题描述

我正在尝试使用笔记本运行 AlphaFold 来预测大型蛋白质的结构。我已经多次使用这个笔记本来检测大小合理的蛋白质(300-800 氨基酸,如果有帮助的话),没有任何问题,但这种蛋白质几乎是 2,400 氨基酸。我首先尝试在一个免费的 Colab 帐户上运行它,该帐户显然没有足够的 RAM。我今天切换到 Colab Pro 并再次尝试,但得到了一个非常相似的错误消息,这次只是在代码本身中,而不是 colab 的那个小弹出提示购买 Pro。奇怪的是,整个运行从不使用超过 9 GB 的 RAM 和 60 GB 的磁盘空间(25 GB 的 RAM 和 155 GB 的可用磁盘空间),所以看起来我什至没有接近资源失败时限制并闪烁错误。

我是 colab 的新手,所以我不确定会发生什么,但似乎该程序可能会以某种方式“自我破坏”并施加与 colab 对 Pro 帐户的实际限制不同的资源限制。对此或其他一些可能性和潜在解决方案有什么想法吗?

提前致谢!

这是确切的错误消息:

running model_1
---------------------------------------------------------------------------
UnfilteredStackTrace                      Traceback (most recent call last)
<ipython-input-15-af48741e914e> in <module>()
     50                          model_params=model_params, use_model=use_model,
---> 51                          do_relax=use_amber)

13 frames
UnfilteredStackTrace: RuntimeError: RESOURCE_EXHAUSTED: Out of memory while trying to 
allocate 1465970944 bytes.

The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.

--------------------

The above exception was the direct cause of the following exception:

RuntimeError                              Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/jax/interpreters/xla.py in 
_execute_compiled(compiled, avals, handlers, kept_var_idx, *args)
    958           for i, x in enumerate(args)
    959           if x is not token and i in kept_var_idx))
--> 960   out_bufs = compiled.execute(input_bufs)
    961   check_special(xla_call_p.name, out_bufs)
    962   return [handler(*bs) for handler, bs in zip(handlers, 
_partition_outputs(avals, out_bufs))]

RuntimeError: RESOURCE_EXHAUSTED: Out of memory while trying to allocate 1465970944 
bytes.

标签: google-colaboratory

解决方案


看起来您的 GPU 内存(最大 ~15GB)用完了,而不是系统内存。我也有同样的问题。不幸的是,如果可能的话,唯一的解决办法是截断蛋白质。


推荐阅读