Lesson 2 official topic

Hi @tapashettisr , if you post help request in the relevant thread as this is not specific to Lesson 2 , it would be useful for others who come looking for help in those threads.

Also, can you try restarting your linux VM under WSL ?

Personally, my path of least resistance would be to just install everything including jupyter in your Linux instance, clone the fastbook repo, then start jupyter notbook from there. I’d be able to connect to it from windows side. But then again, I’m lazy by nature and try to minimize excitement in life that comes from having to mess around with hundreds of moving parts and rather get straight to training models which is the point of the course. :slight_smile:

This topic was covered in lesson 2.

It comes with Ubuntu - no need to separately install a distro.

Hi All,

I came across this, which is apt for the last lesson (lesson 2) of this past week. So, I thought I’d share it.

Thanks
Kind Regards,
Zakia

Ah Ok, thanks Jeremy, I didn’t know that. I installed this long time ago and I was running multiple distros so I recall going to Microsoft store to get different “apps” as Microsoft Store calls them. I had installed Ubuntu and Kali linux at the time.

I made the same mistake a few days ago. I managed to get it part fixed, but sorry I can’t remember exactly. Just can you confirm on Linux that the following returns nothing…
$ which code

My jupiter install was a bit screwed up, and easier to reinstall from scratch than troubleshoot. See my install log.

It gives /usr/bin/code. I am able to access VSCode from wsl terminal but not through Linux. That is not a major problem.
Now I am installing fastsetup and following the steps given in the GitHub - fastai/fastsetup: Setup all the things.
I am stuck at sudo ./ubuntu-initial.sh
The prompt says Enter hostname to set:
What does it mean and what should I enter here?

@suvash As you mentioned if error_rate once starts improved, and then goes on decreasing is that an indication of model over fitting as shown in the image below?

Full code:

1 Like

For installing image classification learner which Jeremy showed in lesson2. When I am running in a notebook, I got the below error:

I used the following imports only:

from fastai.vision.all import *
from fastai.vision.widgets import *
1 Like

fastai/widgets.py at ab154927696338741e59e0ffc4774777c4a9781c · fastai/fastai · GitHub seems to be where the cleaner comes from.

1 Like

It’s just the setup-conda script that you’re meant to run. Don’t run ubuntu-initial.sh.

1 Like

I don’t see an error in the image you’ve provided - I’m just seeing the text output of that cell. Is that what you’re referring to?

If so - just execute the cell (shift-enter) to and the interface will pop up.

Yes it’s not an error. It’s a text output in shell. The code is as show below in screenshot.

So the first screenshot was when I ran on JupyterLabs on top of JarvisLabs. On running shift+enter multiple times I get the same output, which is a bunch of images with text output for the value of cleaner. (cc: @VishnuSubramanian )

While when I tried in Kaggle I noticed, it’s working perfectly fine.

Does ImageClassifierCleaner run only in Jupyter notebooks?

You can still do that for additional distros, or I think you can even start the install fresh from the Windows Store with your first distro. You can then start each from Start, or you will see them added to the drop down of different ‘terminals’ to open in Windows Terminal.
image

Quite possibly - I haven’t tried it in JupyterLab.

1 Like

I’ve annotated the image a bit from the lowest point for validation_loss (i’m assuming), where it seems like training loss and validation loss has diverged.

The error rate (once again i’m assuming) also eventually increases towards the end again. With this information, I would assume that if the training continued in the same trajectory as it is in the image above, the model would definitely get worse overall (it’s currently overfitting, started at epoch 9, and also got worse from epoch 18 in terms of metrics).

The learner object also has a recorder that can plot losses after each fit session. You can get a plot via learn.recorder.plot_loss() and interpret the results better. Image below taken from Chapter 5 of the book. And as the book mentions, in the end what matters is your metrics, not the losses really.

So, I’d say that you might have to train a bit further to see the error_rate get worse with certainity before you can rule that the model is indeed getting much worse.

2 Likes

I having trouble reconciling these two comments:

WSL is “through Linux”.

Now I suspected this would be the case for `which code`.

My vague memory from last week is that this remained after I uninstalled VSCode from Linux. This indicates “code” was not fully uninstalled, and this is being executed in preference to the “code.exe” located on the windows side. I think I just deleted the file, but not sure - keep a backup of the file.

Yup that file is safe to delete. If it exists, it means you’re running the WSL vscode, which isn’t what you want.

1 Like

Has anyone had any luck with setting up a rig to use fast.ai with ROCm? I’ll be attempting this by working with the official AMD documentation and looking at this topic, though it has aged somewhat Fastai on AMD GPUs - Working dockerfile . Using docker seems to be the best supported way.

Yeah, it is not working on Jupyterlab which is the default while using Jarvislabs.ai, the simplest way to switch to Jupyter notebooks would be to replace the word lab with tree in the URL.

I will explore if it can be run in Jupyterlab.

1 Like