Beginner: Setup ✅

As a general rule, I would hesitate to use GIthub Desktop to manage files on WSL because of potential line endings issues. YMMV though, since there are settings to help, that you should familiarise yourself with so if you want to give it a go…

I see. I only went the GitHub Desktop route because it was recommended in the lesson 2 video the way Jeremy does at the below timestamp

I’m totally open to other ways to set things up as I was merely trying to follow along with Jeremy. I think I’m going to google some information about setting up a Conda environment in a Ubuntu on a Windows machine rather than just following the steps in the video.

Thank you both for the help and patience!

1 Like

If you are using WSL on Windows 11, Linux gui apps will work, so installing Github Desktop for Linux may be an option (I haven’t tried it yet)

I think I’ve managed to git things working by not using GitHub desktop and instead using the below snippet. I still wonder if there’s something obvious I’ve missed, because I can’t follow Jeremy’s steps from lesson 2, and from searching I can’t seem to find anyone else with same issues as me. Anyways, thank you for the patience and help. Hopefully I’m good to go now.

git clone https://github.com/fastai/fastsetup.git

1 Like

I’ll sometimes clone using HTTPS if I’m on a new system, not yet set up SSH keys and only want a quick read-only copy. This provides exactly the same clone as via SSH.

The difference comes when you want to push changes back to the server. When you cloned using SSH, the push authenticates transparently. When you cloned using HTTPS, it used to be that you had to enter your username/password EACH time, except github has now dsiabled username/password and you need to have set up a Personal Access Token (PAT). Down the bottom of that link it indicates there is some way to cache your PAT, but I’ve not used this method so can’t advise.

I can’t seem to get the first lesson up and running. I have a MacBook Pro M1 Max and the notebook seems to get stuck at learn.fine_tune(3) step. What’s interesting is that it was working fine (slow but worked) on my MacBook Air M1 just a month ago or something. Does anyone know what might be the reason?

I tried running Jupyter with this OMP_NUM_THREADS=1 jupyter-lab but it didn’t help.

I also noticed that the download_images block is taking a lot of time even on my beefed up machine.

Hi everyone! Sorry if this is dumb question, but after some time working on Jupyter notebooks (I tried Colab, Paperspace Gradient, and Kaggle code), I’m finding it’s not the best coding environment / IDE for me. In general I’m not a fan of coding in the browser, and in particular, I’m uncomfortable with file browsing latency (I’m in a “remote” location ping-wise) and default browser behaviors. I also miss my VS Code custom config.

So, the question is: is there any way to somehow run the Jupyter notebooks inside a VS Code local instance in my computer? Or, more generally, what’s the recommended workflow to write my fastai code locally in my machine, while still being able to run it on a cloud GPU (Paperspace Gradient, for example).

Ideal scenario summary:

  • using Visual Studio Code to write code
  • running GPU-accelerated code in Paperspace Gradient

Does this make sense to you folks? Anyone else in a similar situation regarding development experience in the browser being suboptimal? hacky solutions welcome, as long as I don’t have to code in a browser ^^'.
Thanks for reading!

1 Like

Yes, you can connect vscode to a remote instance, including running notebooks:

1 Like

Awesome!! More info on how to do this on Paperspace Gradient here:

4 Likes

Hey does anybody know how to link GitHub repo with my PaperSpace Jupyter Notebook?

how to link GitHub repo with my PaperSpace Jupyter Notebook?

$ cd /notebooks
$ git clone YOUR_GITHUB_REPO
1 Like

What is the difference between cnn_learner and vision_learner.

Why is it that if I import vision_learner and it runs successfully, but when I try to use it to train a model with it, it shows a NameError: name 'vision_learner' is not defined

Though I know replacing cnn_learner with vision_learner solves the problem, I am curious to know which module to import that will make vision_learner work or is it just obsolete. I see that vision_learner is still defined in the fastai github repository

I think the cnn_learner is an “old” name of vision_learner. As of now, it is possible to build vision models using non-CNN architectures, i.e., vision transformers. That’s why it was renamed, I believe. Also, in your error, there is a typo: your function is called vison_learner while should be visIon_learner. On my machine, importing fastai.vision.all (as you did) is enough to get access to the function.

1 Like

But I’m seeing now that it still doesn’t work in windows because
NotImplementedError : cannot instantiate ‘PosixPath’ on your system”

I was also having a similar problem when using a a pkl model I exported in Kaggle and using it on Windows. I added the following code to get it working on Windows:


plt = platform.system()
print(f"Platform : {plt}")
if plt == 'Windows':
   pathlib.PosixPath = pathlib.WindowsPath

That also enabled it to still run on Linux when I uploaded it to a HuggingFace Space.

1 Like

thank you I see the typo

1 Like

I’ve made an error in the pre-run.sh and now I cannot start any instances on the paperspace :cry:.
It reports all the errors and refuses to start a machine.


Did anyone have a similar problem and found a solution?

With apologies, because I know this has been asked/answered elsewhere (but I cannot find it!)…

Where do the most current lesson notebooks live? I can only find the notebooks located at GitHub - fastai/fastbook: The fastai book, published as Jupyter Notebooks

But in the case of Lesson 2, @jeremy is working off of an updated notebook. (For example, it replaces Bing image search is replaced with DDG, and Binder with Gradio.)

I assume there are other such updates throughout the later classes. Where do the most current notebooks, as shown in the videos, live?

I suspect I am missing something very obvious here and, for that, I apologize. :roll_eyes:

Thanks in advance for any time/attention on this inquiry. Cheers!

If you follow along with the content at Practical Deep Learning for Coders - 1: Getting started . There is a resource section on the page that lists the relevant locations.

2 Likes

Thanks for the quick response, @AllenK ! Just to clarify, are you seeing a link to the course notebooks on the Practical Deep Learning for Coders - 1: Getting started page that links somewhere other than the repo that I linked to in my original post?

The Lesson 2 notebook in that repo contains some different code than Jeremy shows in the Lesson 2 video. He acknowledges the difference at timestamp 10:23 and indicates that he’s going to post an updated notebook…so I’m just trying to find that updated notebook, if it does, in fact, exist somewhere.

Sorry, again, if I’m just missing something obvious here.

The latest lessons use a mix of the fastbook repo and new nbs in the course repo + Kaggle.

The course22 repo is here.

(Sorry, I have limited internet access atm to check the vid, but the notebooks are edited / corrected reasonably often, so I’d assume any change mentioned would have been made. )

2 Likes

Hi everyone! I need help going throught the section of the first chapter regarding “Getting a GPU Deep Learning Server”! I cant find any recommended list of GPU servers or any tutorial on how to use them.
Also how did he jumped to this point? (se img below)

Thank you all!