Google Colab causes high memory usage in local?

Viewed 3153

I'm now running a model training on Google Colab. It was just a minute ago, the local system message popped out and said that the memory is about to exhaust (meanwhile I didn't run anything).

Now my memory usage is 40%, but everytime I open up Colab, the local memory usage peak to 80 and keeps increasing. The Colab page freeze so I couldn't stop the current runtime.

How is that possible? Shouldn't Colab be an online environment? Can it be related to the tqdm package? Because previous version ran well, this situation only happens when I just add tqdm to show progress bars on the screen.

1 Answers

Have you connected your Colab instance to a local Jupyter instance ever? Colab should default to using hosted environment resources over local ones. The tqdm package is preinstalled for python in Colab, and works fine in my notebooks. Can you share a minimum reproducible example?

First, I would try looking at the memory from the notebook by running

!cat /proc/meminfo

Colab instances should have between 12-30 Gb of total memory. If its tracking local memory, you should be able to tell.

Next, I would try saving your code, closing Colab, then reopening it. Be sure when you reconnect, select "connect to hosted runtime" in the connection dropdown menu (upper right corner, below the GDrive menu bar).

Related