Lesson 2 - Official Topic

Thank you, I want to continue using fastai-v1, is there a safe way to upgrade to the latest version of fastai-v1 without corrupting the environment with fastai-v2?

I think I know the mistake now. All the free GPU at Gradient was used up and so I was unknowingly using CPU.

If you sign up for an account and use the discount code, you’ll magically get the free GPUs on a more regular basis than trying to get by using a free account.

1 Like


The dls.valid.show_batch and dls.train.show_batch does not show any images when I execute the command. Screenshot attach. The same is the case with the confusion matrix.

Is any specific package required? How can I resolve the issue?

Having same problem here with paperspace free instance too

Sorry, misspeled…
In my case in paperspace (don’t know why) the notebook code had the simbol dash larger (:face_with_monocle:) so substituted with two regular – did the thing. Maybe it helps you too if that’s the case also¿?

Does Jeremy recommend we go through the course lesson and then the related book chapter? Or the other way around?

I am not sure what jeremy recommends so someone else who does know can jump in here.
I think jeremy made the book to be used in a hands-on manner: I would read the book, and as you go, run the notebooks in parallel.

1 Like


Is there a way to ensure that the validation set in the datablock has equal set of samples from each class assuming a balanced class for classification?

Ganesh Bhat

Yes, you can use the stratify option in the TrainTestSplitter. Under the hood it uses the train_test_split function of scikit-learn.



Hi Everyone,

I have been trying to launch a bear classifier on binder since last 3 days, not sure where I am getting stuck.

Have been able to launch the web app locally with voila, but not working with binder.

Github repository link: https://github.com/Avinash1419/Voila_bear

The app when launched locally on voila looks like this:

It works perfectly fine for basic options as expected.

But when tried on binder, without mentioning anything in the file section on mybinder, it loads as a jupyter notebook hosted online. But with URL as required for voila, with necessary form fields, it always comes up with 404 error issue as shown below:

The form fields filled are as shown in the figure here:

Please suggest ways to resolve this issue!!

Things I felt might have been the issue, but I couldn’t resolve them:

  1. I have stated required packages in the requirements.txt after finding out the locally used packages in the Jupyter notebook. List of packages mentioned are listed here:


The list was generated by a basic code (included in the main .ipynb file in the last cell). Voila was included manually (it wasn’t generated in the code). But I am not sure if any other packages are to be listed.

  1. On running the beginning part of the code for importing fastai modules, faced a small issue as shown in the image:

It didn’t create issue in voila launch, not sure if it could have been an issue in binder.

  1. On mentioning the URL in binder site, I wasn’t sure of the format of URL. I used the one shown in the image above of mybinder, with and without ‘/’ in the beginning, i.e. before “voila”. Both of them didn’t work. Let me know if I should try some other way.

  2. I have commented these two commands in the .ipynb file.
    !pip install voila
    !jupyter serverextension enable voila -sys-prefix

Basically, since all the requirements of installation are being given through requirements.txt, I thought these aren’t needed in the .ipynb file.

This is the basic context of how I tried to work on the problem, and concerns I felt were relevant. Please let me know if this can be resolved one way or the other!

1 Like

Greetings All,

I am currently unable to deploy my drone classifier notebook onto Binder. I get the error below (please refer to the screenshot). Was wondering if anyone could share where I might have gone wrong here.

Link to my github for the drone classifier code: https://github.com/SantoshYadaw/drone_class

Thank you in advance :slight_smile:

You’ve told it to use a branch called master but you don’t have one, just one branch called main


I just had the same problem. It seems that my paperspace notebook got downgraded from GPU to CPU while running. There was a message telling me the kernel died, and I am pretty sure, that it was a GPU instance when I started it.

Not sure if this is the right thread for my questions… I found it very frustrating trying to implement the web-application as in the lecture demo. I am using Colab and read the “warnings” but still decided to put some efforts trying to run something similar.

  1. If I want to follow the example, I need to have my model (pkl file) on github on same folder as my classifier app. the problem here is I couldn’t find a convenient way saving my pkl file from the colab environment into github. I could download it to my desktop and than upload to github through github desktop… but felt I’m doing something way too complicated than it should be…
  2. Since using Colab (and plan to continue doing so) is there any suggestion how to make something similar with Colab (any alternatives to Voila, Binder, maybe using Forms, colab widgets or any other idea for “quick production deployment”…)
    Will highly appreciate your feedback

Personally I would map your Google drive inside Colab and copy the pkl to there, your web app can then download the model file from your drive.

See the bottom of https://course.fast.ai/deployment_heroku for an example.

Voila and heroku are probably the easiest and quickest options for a beginner.


Thanks Joe!


1 Like


Hi, anyone else faced this issue?

1 Like