Beginner: Setup ✅

I’m also trying to get fastai working in Azure ML Studio and I’m running into some problems. Let me know if you figure it out.

Hi, trying to go through the initial setup but I’m not finding the list of recommended GPU servers/setup instructions. Looks like the link to the book redirects to the course website, but wasn’t able to find the list elsewhere either. Anyone know where this is? Thanks.


(Screenshot from lesson 1 of the book, “Getting a GPU Deep Learning Server” section)

1 Like

The two providers I’ve seen mentioned here on these forums a lot are Paperspace and Jarvislabs. In fact, Jeremy’s first few code walkthroughs have been specifically on how to setup a Paperspace server. I’ve used both (lightly) and they both seem pretty decent. I’ve also used Colab and the free notebooks on Kaggle. I did not have good luck with SageMaker Studio Lab ( Note the “Lab” at the end. I could NEVER get a GPU … so I wouldn’t waste any time on exploring that platform.)

If you are interested in rates and comparative analysis of larger service providers and their cost comparisons, you might find the list of GPU providers created by the FSDL (Full Stack Deep Learning) folks interesting.

HTH.

1 Like

Hello I’m trying to set use the fastsetup, but am running into some trouble. I’m totally new to these linux environments so I’m sure I’m missing something obvious. I had to change the permissions of setup-conda to allow it to execute (chmod +x setup.conda.sh), but when I try to run it with the ./setup-conda.sh command I get the following error:

/usr/bin/env: ‘bash\r’: No such file or directory.

What am I doing wrong?

1 Like

You need to start with describing what your current setup is, Please don’t make people play 20 questions because most people will not respond to such open ended and vague questions.

1 Like

Hi All,

I’m having issues with setting up fastai in jupyter notebooks on my MacBook Air (or maybe I just don’t know how to use jupyter…).

I have installed fastai and nbdev using mamba as per Lesson 2 video:

Then in jupyter notebook I called !pip install fastai and a message states that fastai is already installed. However, when I try to import fastai modules, it says that the Module cannot be found.

I feel like I’m missing something fundamental here? Thanks in advance for any help or suggestions.

Hi All,

Found the answer on stackoverflow. I’m leaving the link her in case someone has the same problem as me:

jupyter-notebook-cant-find-modules-for-python

3 Likes

Not exactly sure how to resolve your issue, but my suggestion would be for beginner just to use either kaggle/colab notebooks to get started.
The kaggle list for all the notebooks jeremy uses can be found here:
Jeremy Howard | Notebooks Grandmaster | Kaggle
Otherwise you would have to spend large propotion of your learning time dealing with dependency issues and such, and it could be quite frustrating often times. :sweat:

2 Likes

Great to hear~

Thanks, Josh. I actually started with Kaggle as the book and the lesson notes suggested that it’s too hard for a beginner to run ML code locally. However, for some reason, my Kaggle CPU always shoots up to 100% and I lose the autocomplete feature. I thought I would give jupyter notebooks a try just for the autocomplete feature. This is probably because of my coding inexperience, but I struggle to code without autocomplete and IntelliSense. That all being said, you are right - I will give Kaggle another try.

1 Like

(nevermind, I fixed it; after reviewing the notebook on Kaggle, I realize the function was defined up in an earlier cell)

Hello, I have trouble running a piece of code on my system, from this timestamp: Lesson 3: Practical Deep Learning for Coders 2022 - YouTube

I am having trouble running plot_function() as it is written, running into unknown argument issue. From this thread, I conclude it is because of older version of fastbook.

But, how do I get the latest version? I am running the following packages below. How do I get the latest fastbook? From the Jupyter notebooks, they are running !pip install -Uqq fastai to install.

Hi all,

I’m running on a Windows 10 machine and I’m trying to follow the steps in Lesson 2 for fastsetup. I’ve done the following steps so far:

  • Install GitHub Desktop
  • Install Windows Terminal from the Windows Store
  • Install wsl using the command wsl --install
  • Reboot PC
  • Activate WSL in terminal by typing wsl
  • Fork fastai/fastsetup: Setup all the things (github.com)
  • Navigate to the directory of the fork
  • Type ./setup-conda.sh

This is where I’m stuck. I’m getting the error “/usr/bin/env: ‘bash\r’: No such file or directory”

I’m a complete Linux noob and have no clue how to proceed. Google didn’t give much help. Any help is appreciated.

If not, is there any reason I shouldn’t just set things up by letting VS Code or PyCharm install my conda interpreter and pip install the rest of the missing packages? Thank you.

Hi all,
I’ve started trying the bird_or_not image classifier in lesson one and I was wondering if fast ai uses GPU by default. I have an Nvidia GPU installed locally and have been trying to figure out a way to make my resnet use the GPU while training.
Basically, I need a fast ai alternative of

device=torch.device('cuda')

Any help is appreciated. Thanks in advance!

It usually does this automatically. Check

import torch
torch.cuda.is_available()

to see if everything is set up correctly. If it returns False there might be something wrong with the installation.
The fastai way to move data manually to the GPU is: something.to('cuda') (something.to('cpu') to moves it to the cpu).

1 Like

Thank you. I was working in a different environment where pytorch was not installed. Now I’ve changed the environment and I am getting the following error:
BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

Above is the code and I’m using a windows pc with Nvidia RTX 3070 gpu.

The error seems to be occurring when running verify_images method.
Found the solution here given by Life.exe.

2 Likes

Console can open shells for many tools.
Your console has opened up a Powershell session, you just need to open one for Ubuntu
Click the little down arrow and select Ubuntu.
Then you will have an ubuntu bash console, and the commands will work from there.

image

To make this window your default for next time you open the console app, you will find that option under the settings menu.

2 Likes

Thanks Allen. How is that different from running the command wsl from the command prompt. Also, now that I’m using the dropdown to select Ubuntu, I guess now my challenge is finding my linux home directory and pointing my GitHub Desktop at it. Is that correct or am I missing a step that’s making this harder?

Edit: Easier than expected. Found by typing explorer.exe .
Edit2: Now permission denied. There has to be some setup steps that I’m missing.

Preformatted textHow is that different from running the command wsl` from the command prompt.

Good question. one that @bencoman can likely answer better than I can.

I think the wsl from command prompt was added as a shortcut,
if you run it from the windows start menu, it will launch but the icon in the console tab still shows the ‘cmd’ icon, so I suspect it is still limited in some way or has an extra layer of redirection.

However if you launch from windows start menu choosing ‘run as administrator’ you will see the linux icon in the console tab, so I suspect that is that same as choosing from inside console.

Try all 3 and see if there is a difference with the permission issues you are having

1 Like

AFAIK there is no difference starting the a Linux shell from the pulldown or typing wsl at a windows command prompt. I was impressed that @AllenK noticed the small detail that I’d missed of the powershell icon in the tab…
image

but with the additional info that you’d run wsl from Powershell, its irrelevant that the original shell was Powershell. Your commands are processed only by the Linux shell.

btw, I usually start my Linux shell doing WindowsButton-R wsl <enter>

now my challenge is finding my linux home directory

I think you may already have found it, but you should see a Linux icon in Windows Explorer…
image

and pointing my GitHub Desktop at it

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…

Now permission denied. There has to be some setup steps that I’m missing.

To assist, you would need to report your actions leading up to this error.

1 Like