Fast.ai on Google Colab issues, help please

Hi, I have tried to install things in Google Colab using lots of suggestions and now also this one:
https://course-v3.fast.ai/start_colab.html

which looks great, however I get these errors:


ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 from fastai.transforms import *
2 from fastai.conv_learner import *
3 from fastai.model import *
4 from fastai.dataset import *
5 from fastai.sgdr import *

ModuleNotFoundError: No module named 'fastai.transforms

help please :slight_smile:

OK Javier: It looks as if the course-v3.fast.ai/start_colab.html should set you up for the Fast.ai 1.0.* software.
However: If you look closely at line 2, you will see the code - “from fastai.conv_learner import *”.
That is code for the old 0.7 fastai software, not the new software, and it will not work.
So you need to find the github repo for the new notebooks and use it with the new software.
If you have taken the course-v3 and/or watched these videos, that is what you should do.
If you want to use the old notebooks you must “roll back” the software to version 0.7.
Another question is: are you studying with a group or on your own?
If you are with a group you should use the same notebooks AND software that they are using in
order to communicate (and learn) more easily. Even the videos are different for the early software and the v3 which will be formally released in January of 2019.
This is the downside of being on the “cutting” or “bleeding” edge of modern Deep Learning software. It is very much like holding the tail of a very large and powerful horse while you both are being attacked by a cloud of vicious wasps. If you are not kicked to death and if you don’t let go of the tail, you are very likely to be painfully yet rapidly transported, in a highly exciting manner, to someplace you never imagined you would be.
Let me know what direction you might like to take.
Allan

1 Like

Hi Allan, and thank you very much, you are all very helpful :slight_smile:
so i finally made it work but doing something really weird, doing this

a) !pip install http://download.pytorch.org/whl/cu80/torch-0.3.0.post4-cp36-cp36m-linux_x86_64.whl && pip install torchvision

b) !pip install fastai

c) !apt update && apt install -y libsm6 libxext6

at this point I get some errors and then I do

d) !pip3 install torch torchvision fastai==0.6

e) restart runtime

and then it all works fine!

but I cannot do d) without doing a) b) c) , then it doesnt work,
for it to work I have to literally do a) b) and d) as you see there in that order

im sure this is not ideal, but it works, so far :wink:

so the notebooks Im using at the moment are the ones I downloaded from the fastai master github repo, are those the old ones?
Im following the videos here
https://course.fast.ai/lessons/lesson3.html
Im in 3 so far

so are you saying that from january 2019 there will be brand new notebooks and brand new videos? great, and when will those be active and when and where can we find them online? excited for that

so with the new notebooks it will be enough to do this
course-v3.fast.ai/start_colab.html
and it will work like that?

thank you again, by the away im doing this on my own so far but I would love to join a group, Im based in Barcelona, Spain, btw I know some of you are from bay area, I lived in Silicon Valley for 6 years, San Francisco and Palo Alto, was involved in a few startups, returned to Europe 3 years ago or so, so yeah would love to get involved with more people and a group if I find one around, so till then I started on my own, I did the 3 first complete courses of the Andrew coursera deep learning specialization, and the last 2 I did the videos of it and then I found fast.ai and instantly I loved it so now Im going all in with fast.ai :wink:

so I downloaded the new notebooks at:

and ran
https://course-v3.fast.ai/start_colab.html

and for now its working :wink:

where will the new videos be? will they replace the current ones in January?

any suggestions to join a group somewhere?

thank u :wink:

1 Like

so yes its working but in lesson 3 with the planets I now got this error, will try to post on the forum

data = (src.transform(tfms, size=128)
.databunch().normalize(imagenet_stats))

You can deactivate this warning by passing no_check=True.
/usr/local/lib/python3.6/dist-packages/fastai/basic_data.py:205: UserWarning: There seems to be something wrong with your dataset, can’t access self.train_ds[i] for all i in [12055, 18692, 2100, 23398, 10386, 21287, 7103, 3395, 22337, 15219, 30742, 12772, 13602, 23094, 5016, 29438, 1820, 5728, 20708, 4628, 29504, 22855, 10699, 24698, 27910, 31950, 12095, 17326, 10178, 25479, 9811, 23495, 4600, 29706, 7890, 2902, 21275, 15381, 10512, 7632, 31732, 32081, 19886, 543, 7920, 24887, 12894, 32221, 15135, 3343, 17710, 5169, 28317, 31561, 24068, 29490, 6354, 4988, 7926, 6202, 19658, 11343, 15324, 15448]
warn(f"There seems to be something wrong with your dataset, can’t access self.train_ds[i] for all i in {idx}")

Hello
I am using fastai in Colab. I want to run my python code by changing architecture of awd lstm. I tried making the changes in /usr/local/lib/python3.6/dist-packages/fastai/text/models/awd_lstm.py but they do not get reflected in the final result. What am i missing? Can you please help.
Thankyou.