Fastai v2 daily code walk-thrus

Done! Thanks for the reminder.

Today’s walk-thru will be the last one for now, since we’ve covered all the key stuff at this point (except for learner/callbacks, which were already covered in detail in part 2 v3 of the course). Live stream 2.30p pacific: https://youtu.be/5py5M2DqcRc

There might be more walk-thrus in a few weeks if any more interesting topics pop up…

12 Likes

Will you potentially demonstrate an end-to-end training example? Also, have there been any significant changes to the callback system since the part 2 course?

2 Likes

Walk thru 10: https://youtu.be/5py5M2DqcRc

2 Likes

thank you for these great walk thru’s. Is it possible to cover a walk thru for Audio data ?.

1 Like

Sorry for the delay, I just saw this. The audio module isn’t as mature as the rest of v2 so a walkthrough wouldn’t be that useful, but we have a lot of audio resources if you’re looking to get started. See the Deep Learning With Audio Thread and post any questions or share what you’re working on/interested in. Or for now try out the fastai v1 audio library (external).

We also have a telegram chat for audio ML, if that interests you DM me your telegram details and I’ll get you in.

2 Likes

Anyone has same problem? self.items cannot set attribute. if I change items to any other name, it will works.

@fanyi we fixed that yesterday, so you’ll need to git pull. BTW fastai.text v2 is less stable or well tested compared to fastai.vision at this point, so expect daily changes and bugs.

Thank you very much!

I was running the fastai v2 in Ubuntu w/o problem. Now I try to move to window 10 by running VS Code (since new python extension has a Jupyter server which is worth to try). But in VS Code, it always report “no module named local” when import module like “local.xxx.xxx”. problem seems be python extension used by VS Code can not find the other files is from the python file or notebook in same directory. This looks very weird. And advice? Thanks.

If you print your current directory, you will see you are in your VSCode root dircetory instead of the notebook directory (which is the normal behavior)… thus you cannot find the “local” module

1 Like

To follow up, a quick fix will be change Notebook File Root to the directory and you should be good to go.
i.e. ${workspaceFolder} -> ${workspaceFolder}/dev

I wonder if the delegated inheritance describe in https://www.fast.ai/2019/08/06/delegation/ works in VSCode Notebook.

@fanyi

3 Likes

I tried @nok suggestion but somehow it didn’t work. Then I tried this workaround : not very elegant! but it works.

I added this cell at the top of the notebook:

import os
os.chdir('C:\\Users\\fh\\dev\\fastai_dev\\dev')
!pwd

@nok, if you have any insight, please advice. Thank you

@faird I would expect your root directory is the repository and you have restarted the notebook after your change the setting?

Thank you @nog for your fast reply. I made the change like you suggested.

Then I closed the workspace and opened it again. Then I opened the notebook and I still have the same import error.

I noticed when I run !pwd it points to my grand parent folder (/c/Users/fh/dev). I think that’s the source of the problem.

@farid As I said, I expect your root directory is the repository, base on what you said, your root directory is /c/users/fh/, so you just need to supplement the directory accordingly. That would be {workspaceFolder} /dev/fastai_dev/dev

You may want to check out the concept of workspace for VScode, most of the directory setting are relatively to the root.

1 Like

TLDR - @fanyi just start your Jupyter notebook in the right folder (i.e. my_path_to_fastai_dev/dev and you don’t need to change the ${workspaceFolder}

Thank you very much @nog for your insight. It turns out the source of the problem that I had was related to the folder where I started my Jupyter notebook in the Windows console. I usually start it in my dev folder (i.e. C:\Users\fh\dev\) in order to conveniently open both fastai v1 and v2 notebooks plus other projects notebooks.

I now start my Jupyter notebook in the fastai_dev/dev folder (i.e.
C:\Users\fh\dev\fastai_dev-farid\dev -> where the v2 notebooks are located) and everything works well.

@nok, @farid, thanks to you guys, very helpful.
I works either add “/fastai_dev/dev” after the ${workspaceFolder} , or change the directory in notebook.
but if I just start vs code from “/fastai_dev/dev” folder, VS code ask me to install “jupyter notebook”.

Thanks again!!!

2 Likes

I got an err “Can only use .str accessor with string values” when use “load_tokenized_csv”, and then fixed the problem with changing:

out[txt_col].str.split(’ ‘)
to
out[txt_col].astype(str).str.split(’ ')
So is there any problem if we make this change in the FastaiV2?

I wanted to dive a bit deeper into the fastai2 software and code. I saw the first video and I really liked it but I’m not sure if the API of the fastai2 on that time is still consistent with the one officially released now. Can someone tell me if there is huge differences or I can run the notebooks with the official and recent installation of fastai.
Thanks