Beginner: Beginner questions that don't fit elsewhere ✅

How does the validation set function , i mean we

valid_pct=0.2

by default in fast.ai but where do i know how is this used ? it seems like a black box to me.
Can some one please explain as to how this works and where do i get to view how the validation set is used in the model?

Thanks for the suggestions @benkarr , I don’t know how to share the notebook directly thus I’ve uploaded all the screenshots if that could be of any help.

In short, the validation set is used to report the performance of the model (as per the metrics that you choose, error rate is the default I think). It is not used for training the model.
You can do:

splits = RandomSplitter(seed=42)(items)
splits

Where items is any list-like object. You will see the two sets it creates.
Hope this helps.

1 Like

You could upload your notebook to Github or kaggle and post a link here.

I couldn’t find any obvious mistake scanning your code and since you have all the code the original notebook has (assuming we both didn’t miss something) that should work fine…
It seems that you are using a local setup, so a way to aproach this could be to actually do the uploading to kaggle part and check if it works there to pin it to the code or the evnironment (and I could also have a closer look :smile:)

Thanks a lot for bearing with me.
It appears to be as you pointed and the fault may actually lie with my local system as the result were similar to jeremy’s in the kaggle notebook.

https://www.kaggle.com/monarch252001/fastai-lesson-1/edit

How should I proceed from here? I’ve already tried reinstalling the fast AI libraries on a new conda env but the results were still the same.

hi @mozart_25, Strongly concur with @benkarr that you should start your fastai journey using the online services, as well as your local install. Its much easier to assist you. You are then also able to compare your experiences between the two enrionements to help isolate problems.

You do need to set your kaggle notebook to “public” so we can see it. At the moment I get a 404 error.

Regarding your local environment. Did you set it up according to the Live Coding walkthroughs?

Just as a point of reference, could you do this check…

import fastai
fastai.__version__
2 Likes

It shows ‘2.7.9’
Cool then I’ll proceed with colab for now and try the local environment when I’m more comfortable.
Appreciate all the help and suggestion, it truly means a lot.
Thanks !!

2 Likes

Great :+1:
Just to leave this very useful command here:

import fastai.test_utils
fastai.test_utils.show_install(True)

gives a summary of your installation. You could check your library versions, cuda / cudnn version, nvidia driver and gpu availability. All of those, or the compatibility between them could cause the problem. In particular you see that using a cloud setup is tremendously less complex since the last three points are generally taken care of :slight_smile:.

2 Likes

Hi!
I just started reading Chapter 1 of the the book (Google Colab).
I am trying to run the example that trains a model to recognize cats and dogs and the training process seems to be taking quite awhile (like over 30 mins).
Data and pre-trained model downloaded pretty quickly, but the training phase seems to be taking a really long time.
I was under impression that is should be couple of minutes.
Is there something wrong with my cloud environment setup?
Or is the code outdated?

You may need to change the runtime type to GPU using the menu at the top.

3 Likes

Hey Aman, were u able to fix ur problem?

try to change the accelerator from cpu to gpu

Unfortunately no.

As of now I’m working with colab and it doesn’t seem I’m missing out on anything thus I’ll come back to this during my re-watch.

For lectures kaggle notebooks work awesome.

1 Like

does anyone know how to store my Hugging Face username and password on my computer or in VS Code, so I don’t have to enter them every time I push to Git / Hugging Face from VS Code? currently when I push I’m prompted to enter my username and password for Hugging Face.

when I push I get this:

/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe get: 1: /mnt/c/Program Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe: not found

this looks like there’s an error to do with Git Credential Manager. Git Credential Manager is included with Git for Windows. I think I have Git for Windows installed.

Im actually confused what to use at this point for blogging cuz the fastpages project has been deprecated (it was on github) or quarto which seems to have a steep learning curve.

Hi all, I am going through the material of chapter 1 clean version on Papers space and just digging into the fastai library using the doc method, but when I try to click on show in docs link I get a "Not Found
The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

Btw the link to the source code of things works.

Not sure if anyone is experiencing this as well?

Hey :slight_smile:,
When I tried this my nbdev library on paperspace was completely outdated (still v1) which created the wrong links.
Updating nbdev fixed the issue for me, keeping fastai up to date would also be a good idea, so run:

mamba install -c fastchan fastai nbdev

from a terminal. Let us know if this does not solve it for you :slight_smile:

Thanks @benkarr that solves my problem, do you know if this will be a persistent change, or will I need to do the add it to the pre-run-sh to make it persistent?

I just restarted the instance I made the changes to and they are gone… I don’t use paperspace much myself, so cannot tell you where to add it exactly :frowning:. Have you watched the Live Coding sessions? I think Jeremy talks extensively about how to set up paperspace and how to make persistant changes in the first couple sessions.