Created
July 25, 2020 14:40
-
-
Save iryek219/5461f92fc9d6532190df1472c0e4ae54 to your computer and use it in GitHub Desktop.
Colab memory info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from psutil import virtual_memory | |
ram_gb = virtual_memory().total / 1e9 | |
print('Your runtime has {:.1f} gigabytes of available RAM\n'.format(ram_gb)) | |
if ram_gb < 20: | |
print('To enable a high-RAM runtime, select the Runtime > "Change runtime type"') | |
print('menu, and then select High-RAM in the Runtime shape dropdown. Then, ') | |
print('re-execute this cell.') | |
else: | |
print('You are using a high-RAM runtime!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment