You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://colab.research.google.com is widely used in data science and AI because of it's pay-as-you go model using a variety of TPU or NVIDIA GPU's. A common use case is going to be to install MAX and python packages into the notebook environment on colab. Couple of other key points:
Colab does not seem to support switching notebook kernels via a menu item. This makes it fundamentally different than jupyter notebook which is self hosted or run locally.
Every tutorial in existence for colab notebooks seems to start off with a notebook cell with the shell command ! pip install my-packages ... into the existing python env. Many scientific and AI packages are pre-installed, for example fastai, torch and transformers.
Background
https://colab.research.google.com is widely used in data science and AI because of it's pay-as-you go model using a variety of TPU or NVIDIA GPU's. A common use case is going to be to install MAX and python packages into the notebook environment on colab. Couple of other key points:
! pip install my-packages ...
into the existing python env. Many scientific and AI packages are pre-installed, for examplefastai
,torch
andtransformers
.Reproduce steps
Go to https://docs.modular.com/max/python/get-started and follow the steps, but in a colab notebook. I am using Colab Pro, which also has a terminal window:
^ as you can see max python package is installed, and python 3.12 as well.
The problem is, all the packages are in a virtualenv, however this is not something the notebook can use!
To confirm, create a notebook cell and execute it (from the get-started doc):
The reason the other imports succeeded is because
torch
andtransformers
is pre-installed on colab instances.Related issues
Suggestion
Enhance magic to support installing into the system python, something like:
magic add --global max
The text was updated successfully, but these errors were encountered: