Lesson 2 official topic

app.ipynb should be the name of the notebook that you’re running. app.py would be the name of the python script created.

1 Like

at 10:17 Jeremy mentioned he would share the link of the updated 02_production notebook (using the ddg instead of bing) on the forum. However, I didn’t find it here. Does anyone know where is it? Thanks

2 Likes

I have a mac local machine, are there any setup instructions for setting up fastai and related environments on mac ? I could only find for windows, on the course site and fastsetup page. Thanks in advance!

3 Likes

Jeremy was using Mac for some of the Live Coding sessions, maybe the second or third onwards. There are some Mac posts in first one, the those videos might help anyway.

There might also be a couple of posts in the topic: For those who run their own AI box, or want to

2 Likes

Installation on MacOS is pretty straight forward and Jeremy covered it as Ben pointed out. Of course you’d only be using the CPU. If you have a newer Macbook (mine is MBP 2015) with Apple M1/ chip, YMMV, as Pytorch is not fully baked for fastai usage but people have used vanilla Pytorch on M1 macs (there are threads here by tcappelle on this)

MacOS is basically a *NIX system so most Unix/Linux methods would apply here as well.

Good luck.

1 Like

On a previous machine on Windows 10, I had a bad experience with WSL[1]. To what extent is WSL necessary? It looks like I could install miniconda, add jupyter, and a bash shell to Windows Terminal. What would I be missing without WSL? The other alternative I’ve been considering is just dual booting. I don’t mind working in Linux.

EDIT: Spelling


  1. Problems with my first attempt at using WSL: It created problems with my video drivers and I had phantom displays. It became very annoying to switch monitors (dock/undock) because Windows would get lost on the phantom monitors. Removing WSL did not clear up the problem and the final solutions was a clean W10 install. I’ve also heard from a trusted friend (but have not researched myself) that WSL creates a number of security holes in Windows. ↩︎

I believe a bunch of people on these forums have used WSL without problems during this years course. Depends how long ago it was though. You may want to look for WSL related posts on the forums (from this year’s course.)

Here’s a PR which adds a search_images_ddg function: Reference for downloading images using the Duckduckgo function has been added. by RJSD3V · Pull Request #516 · fastai/fastbook · GitHub

1 Like

Thank you! Was just looking for this

At the confusion matrix (from the book), it seems that the validation set is larger than expected. For example, we have 48 grizzly bears, but when we constructed it, we included 20% of the total 150 grizzly bears, so we should have at most 30 (some were deleted). Am I missing something?

1 Like

I am having the same issue, with the cat vs dog classifier.

from nbdev.export import notebook2script
notebook2script('app.ipynb')

getting

cannot import name 'notebook2script' from 'nbdev.export'

The nbdev version installed is 2.0.5

2 Likes

I have the similar issue on Kaggle because of upgrading of nbdev, I am guessing. Any hint?

1 Like

Use the latest version 1 of nbdev == 1.2.11. The version 2 is a major change, and removes the function notebook2script. Also while using kaggle, you will need to add “%notebook -e .ipynb” before for it to work.

3 Likes

Adding the following line has solved. Thanks.

!pip install -U --no-deps ‘nbdev < 2.0.0’ fastcore

How should I propose Jeremy to pull this change, at least, for now?

3 Likes

Another problems I encountered in Huggingface Spaces which seemed missing in the video lesson 2 are:

  1. Needed to add requirements.txt to install fastai
  2. model.pkl had to be uploaded via LFS for github file size limitationf

Let me know if there’s more better way. Thanks

4 Likes

Your reply on the kaggle notebook was perfect, thanks.

I’ve actually upgraded that nb to nbdev2 now :slight_smile:

Yeah those are in the tutorial by @ilovescience which I mentioned in the lesson - we don’t have all the details in the video.

1 Like

I’m having a similar issue trying to use the cleaner in Kaggle, it prints the images vertically and then doesn’t actually load the cleaner. I remeber doing the course in previous year in Google colab and it worked fine. It could be an issue with Kaggle?

Hi all! This community is absolutely fantastic and its great to see that there’s been so much built up! I noticed a typo on the link to “aiquizzes.com” for the chapter 2 summary (Practical Deep Learning for Coders - Lesson 2). Thanks all!

Thanks for letting us know - will fix.

2 Likes