Is there any workaround to use mini ai in colab?

I am using colab to make blog post about part2 of the course. I do not have local gpu and can not use paperspace at the moment. So I have to use colab for blog post. Do i need to copy mini ai code to top cells ?
So far I have to skip post 8 of my blog and did post 9. However , most of the future lecture depend of mini ai.
So far it is great using colab and quarto for blogging.

2 Likes

You can just do this in a cell at the top…

!pip install -Uqq git+https://github.com/fastai/course22p2

to install from the course’s github repo… (that will install the miniai module)

then you can import as usual…

from miniai.activations import set_seed
from miniai.datasets import show_image
from miniai.learner import *

7 Likes

Hi John
It looks like pytorch is a issue.

Building wheel for miniai (setup.py) … done
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchtext 0.15.1 requires torch==2.0.0, but you have torch 1.13.1 which is incompatible.
torchdata 0.6.0 requires torch==2.0.0, but you have torch 1.13.1 which is incompatible.
torchaudio 2.0.1+cu118 requires torch==2.0.0, but you have torch 1.13.1 which is incompatible.

Regards Conwyn

1 Like

Hi John
Inserting this first may help. This is from Theo (Torch 2.0.0 is not compatible with anything I want to install - PyTorch Forums)
!pip install torch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 torchtext==0.14.1 fastai==2.7.11

!pip install tokenizers

!pip install torchdata==0.5.1

1 Like

I still get this issue in colab and can not run it in colab , could not find datasets ? Any idea what else I need to install ?
Writing a blogpost about notebook 5 (datasets)

Link of original Jeremy notebook :

Solved it , The solution is to install what John and Conwyn said.
So I install both and worked for this notebook in colab.