Platform: Colab ✅

I also mounted my google drive, but it still doesn’t work for me. Am I missing any other step?

1 Like

Right click on the folder and copy the path to the folder. It might work then.

Thank for @pooya_drv to slightly modify the fastai repo and make this repo tailored for Colab. So, Perth Machine Learning Group could successfully run the Women in Machine Learning Workshop yesterday.

Note: Added the Colab repo link in Wiki.

I downloaded the .pth file of my trained model, however when I returned to training the model (I am working on colab and uploaded the file to /content/models and had created the learner before ),I tried loading the state to the learner using-

learn.load(‘stage_x’)

I was given the error–

unexpected EOF. The file might be corrupted.

Could you help me with this?

Hello! can somebody tell me where the .pkl file is stored as I can’t find it on colab.


Above is my session all the .pth files are there but no “pets.pkl”

Many Thanks mrfabulous1 :smiley::smiley::smiley:

Excited to announce my new widget you guys can use!

I’m working on porting over ImageCleaner so it’s useable for us, but this was my first step in learning about how widgets work in Colab

2 Likes

Hi, i am sharan from india. Has anyone done image scrapping on colab? if so can u share github link. i am facing error while trying to download images.

Solved learn.export() now requires a path and a name.

mrfabulous1 :smiley::smiley:

# this is where you store you data
PATH=Config().data_path()/Path('rossmann/')

# first you need to download .tgz file from url (rossmann.tgz isn't in fast.ai URLs)
!wget -P {PATH} http://files.fast.ai/part2/lesson14/rossmann.tgz

# then you should unzip the file and get all the .csv files
!tar -xzf ./data/rossmann/rossmann.tgz -C ./data/rossmann/
1 Like

A quick little note I noticed. Along with the new ‘beta-testing’ feature that they’re implementing, when I ran into a memory error due to a large pandas dataframe, I got prompted to start a “Large Memory Instance”. This new instance has 25gb of RAM available!

Hi muellerzr I am just doing lesson 3 at the moment so am still learning, however I’ve built 12 different simple classifiers apps.

I wouldn’t worry because if your test set is composed of data that model recognizes easily, then isn’t it likely that the test set could achieve higher accuracy than the calculated accuracy of the model?

My hypothesis is that If I had 2 pieces of data that I passed to a model and one passed and one failed.

If I then created 2 test sets one based on the pass data the other on the fail data.
I would expect 100% accuracy in one set and 100% failure in the other set irrespective of the accuracy of the model.

My reason for this hypothesis is that I recently created a model based on the MINST data set which is black and white. It had a 94% accuracy. I then passed it a test set of colored images and it’s performance was terrible.

I then created a classifier using colored images and passed it the MINST data set the performance was. excellent.

When I a have a made a few tabular apps I will be able test some more.

Cheers mrfabulous1 :smiley::smiley:

@mrfabulous1 that sounds to me like you’re purposefully trying to play to the test set, which isn’t what we want :wink: The test set in question was a random subsample of 10% of my data, to which I realized was the wrong way to do it for such a tabular problem. I instead needed to do like jeremy does in lesson 7 with Rossmann and time-series like data. Thanks though!!! :slight_smile:

1 Like

Hi muellerzr thanks for your comments, they will put me in a good position for when I get to lesson 7.

Cheers mrfabulous1 :smiley::smiley:

Yesterday I published a detailed description on how to set up Google Colab and have it sync with your drive, both for development and storing datasets.
When using the Drive desktop app for syncing you can even write your scripts locally and immediately use them in your Colab notebooks. I find that especially useful for part 2 of the course. Anyway, here it is:

“Setting up Google Colab for DeepLearning experiments” von Oliver Müller

https://link.medium.com/y9PP1SkYQY

Please let me know if you’re having trouble with any of the steps, I’ll see what I can do then :slight_smile:

2 Likes

Hi, I went through the lesson 1 and used my own data set by importing images into the google drive using collab. I am curious to know if is there a way to upload and use the images directly from the local machine? (without importing the images anywhere (collab or drive)- this is needed due to security reasons). Thanks in advance!

1 Like

HI Pradi if there is a way I would like to know to.

It is my understanding that many people have their own GPU so they can train models with out using a service provider such as collab.

I used my Macbook Pro to complete lesson 1.
Unfortunately Macs are not fully supported so it doesn’t use the GPU.

Its specifications are:

Model Name: MacBook Pro
Model Identifier: MacBookPro13,3
Processor Name: Intel Core i7
Processor Speed: 2.6 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 16 GB

However each epoch takes approximately 40 minutes to complete using the pets database.

If security is an issue then you could probably do this.
I have created models then went to bed or worked on something else while they trained.

If no one comes up with an alternative this could be a way forward.

Cheers mrfabulous1 :smiley::smiley:

Do you need to manually download all the course files from Github and save them in your drive in order to get the Lesson 0 notebook to work (specifically, the cat example)? The only way I’ve managed to get that line to work is by running the code to mount My Drive as the base_dir, then changing the path in the open() method to match where the image is stored in My Drive (because I downloaded the entire fastai-v3 course repo and saved it).

However, I haven’t seen anyone else mention that they needed to clone the repo from Github and save it in My Drive (and it’s also not mentioned in the tutorial) so I’m afraid I’ve done something wrong. Would anyone be able to help me?

Hi pratyushmn hope all is well!

I did something similar to what you did. I saved the individual cat file in my Gdrive then changed the path in the open statement.

I didn’t download the whole repository as I only needed the single file.

You’re not doing anything wrong it happens because when we you use Colab we just download the notebook we need at the time.

As you go through the course you will probably make more little tweaks to help things go smoothly.

To me the only important thing is like Jeremy said is to get through the notebooks and writing code so you understand them.

Cheers mrfabulous1 :smiley::smiley:

This works well. Where do you store all this data from sources when you are running out?