This is my first time working on Google Colab. Is it possible to use a variable inspector in Google Collab ? And if so, how ?
Thank you.
This is my first time working on Google Colab. Is it possible to use a variable inspector in Google Collab ? And if so, how ?
Thank you.
Update: as of 2022-02-22, Colab has its own variable inspector. You can access it from the left panel.
Yes. This is how I do it.
Place this code into one code cell and run it.
from google.colab import output
#I don't know why nbextensions don't work with python3.6
with output.temporary():
!pip install --upgrade git+https://github.com/Kreijstal/colab_inspector.git
!python2.7 -m pip install --upgrade git+https://github.com/blois/colab_inspector.git #yes, really.
!jupyter nbextension install --py inspector
import inspector
# open a scratch cell (Ctrl+Alt+N)
# run there
# inspector.watch_globals()
Open a scratch cell (Ctrl+Alt+N)
On it, run
inspector.watch_globals()
And as you code on the left you will see the variables updated automatically on the right. You can even expand dictionaries and other stuff.
References:
Keywords: Google Colab, variable explorer inspector visualize