DigThatData t1_j8xxnpp wrote
Reply to comment by ckperry in [N] Google is increasing the price of every Colab Pro tier by 10X! Pro is 95 Euro and Pro+ is 433 Euro per month! Without notifying users! by FreePenalties
unrelated to OP: what is the "best practice" method for a notebook to self-test if it's running in a colab environment? i think the method I'm currently using is something like
probably_colab = False
try:
import google.colab
probably_colab = True
except ImportError:
pass
which I'm not a fan of for a variety of reasons. what would you recommend?
ckperry t1_j8ygjep wrote
[edit] I give up on formatting
We've never really worked on a foilproof way to detect if you're using Colab, but this might work a little better for you:
import sys probably_colab = False
if 'google.colab' in sys.modules: probably_colab = True
Captain_Cowboy t1_j8z1lv4 wrote
Maybe a little easier:
import sys
probably_colab = 'google.colab' in sys.modules
Viewing a single comment thread. View all comments