Google-colaboratory: No backend with GPU available

孤街醉人 提交于 2019-12-03 05:40:48

You'll need to try again later when a GPU is available. The message indicates that all available GPUs are in use.

The FAQ provides additional info:

How may I use GPUs and why are they sometimes unavailable?

Colaboratory is intended for interactive use. Long-running background computations, particularly on GPUs, may be stopped. Please do not use Colaboratory for cryptocurrency mining. Doing so is unsupported and may result in service unavailability. We encourage users who wish to run continuous or long-running computations through Colaboratory’s UI to use a local runtime.

There seems to be a cooldown on continuous training with GPUs. So, if you encounter the error dialog, try again later, and perhaps try to limit long-term training in subsequent sessions.

You need to configure the Notebook with GPU device

Click Edit->notebook settings->hardware accelerator->GPU

Add some pictures to make it clearer

After Reset runtime didn't work, I did:

Runtime -> Reset all runtimes -> Yes

I then got a happy:

Found GPU at: /device:GPU:0

My reputation is just slightly too low to comment, but here's a bit of additional info for @Bob Smith's answer re cooldown period.

There seems to be a cooldown on continuous training with GPUs. So, if you encounter the error dialog, try again later, and perhaps try to limit long-term training in subsequent sessions.

Based on my own recent experience, I believe Colab will allocate you at most 12 hours of GPU usage, after which there is roughly an 8 hour cool-down period before you can use compute resources again. In my case, I could not connect to an instance even without a GPU. I'm not entirely sure about this next bit but I think if you run say 3 instances at once, your 12 hours are depleted 3 times as fast. I don't know after what period of time the 12 hour limit resets, but I'd guess maybe a day.

Anyway, still missing a few details but the main takeaway is that if you exceed you'll limit, you'll be locked out from connecting to an instance for 8 hours (which is a great pain if you're actively working on something).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!