Trying to run lesson 1 on windows

I am trying to setup fastai course v3 on my local computer because I have a good nvidia graphic card. I am on windows, but I also have ubuntu on windows installed. Using anaconda directly in windows I had problems with the regex which I adapted for windows, but then running this line, it just never do anything:

learn = create_cnn(data, models.resnet34, metrics=error_rate)

I also tried setuping everything in windows ubuntu. This line worked running in ubuntu but then I realized that CUDA is not supported on ubuntu windows I think? So it was super slow to train…

What are my options if I want to use my windows machine? I think there’s a lot of people in my situation where I don’t want to pay for cloud time since I already have a more than capable graphics card.

Thank you for the fantastic course!

Reading more online I realize that fastai v1 is not supported on windows. I did part 1 of the 2018 course on my windows machine and it worked great. Really enjoyed not having to dual boot to linux…

Anything the community can do to make it work for windows? @jeremy

I think a lot of people who already have a fast nvidia card, are windows developers are interested in your course. I would prefer using my existing machine instead of paying for cloud computing time.

Looking forward to listening to more lectures of part 3 now.


1 Like

create_cnn should complete quickly. Did you try to print learn.model() after that step and if so, did you get the network output?

While some fixes are expected in fastai for better support on Windows (per one of the other threads), please feel free to take a look at the Powershell script used to build Windows 2016 Server edition on Azure Data Science Virtual Machine (DSVM) to run fastai. (Disclosure: I am from Microsoft and the initial author of the scripts). While the script does assume some prereq and some directory conventions in the DSVM, for most part the prereq needed is Nvidia drivers and a conda (either Miniconda or Full anaconda). It should be usable on a local Windows 10 natively (though I have not tested it myself). If someone is able to try it please let me know if there are issues or share any tweaks you had to make to get it to run.

As you indicate, after the regex is fixed to make it Windows path, we were able to execute lesson 1 notebooks (and in fact most of the fastai notebooks) on a Windows Server on a Azure DSVM successfully.

I followed the instruction to sign up " Google Compute Platform", and ran the code on successfully. I also have install jupyter notebook via Anoconda3. Per “Getting Started”: “Once you’ve finished the steps in one of the guides above, you’ll be presented with a screen like this” (jupyter notebook page). However, i could not find “course-v3” on my Jupyter notebook. Can some one help?

Much appreciated.

Thank you for your help, I finally got it working. I think my anaconda install was corrupted or something. After wasting a lot of time trying to make it work I just uninstalled anaconda, reinstalled it, reinstalled all necessary packages in anaconda and now it works.

I think image transformation is now my bottleneck. Do you have any tricks on windows to make this part faster?

I can see the following trick from the fastai github page… Not sure we have something similar on the windows side:

Note that JPEG decoding can be a bottleneck, particularly if you have a fast GPU. You can optionally install an optimized JPEG decoder as follows (Linux):

conda uninstall --force jpeg libtiff -y
conda install -c conda-forge libjpeg-turbo
CC=“cc -mavx2” pip install --no-cache-dir -U --force-reinstall --no-binary :all: --compile pillow-simd

Hi @etremblay,

I am also running the notebooks via my own windows machine. Did you encounter any problems after the learn.fit_one_cycle(4) command? Every time I try to run the next cell (‘stage-1’)) my jupyter notebook seems to get ‘stuck’.

I am using Jupyter notebook 5.7.4, python version 3.7.1, fastai 1.0.38 and pytorch 1.0.0.

~ Sophie

Well, I am as of now doing 2019 part 1 on Windows 10 x64 with an NVIDIA GPU. The models do train fine and on GPU so far, I was only stuck due to some regex not working as expected on Windows paths. But together with a helping hand by akubodo on the twimlai slack I could get it to run and SGugger has already accepted my bugfix to be deployed with an upcoming version of fastai 1.0. So, I do think that Windows is a supported OS as of now. Maybe not a first class citizen but supported enough to get it to run. One can then later on either switch to a remote kernel on a Linux VM or directly to all Linux but at least it is not mandatory to directly switch the OS just to run fastai natively.

Hey all,

I’m also having some issues getting through lesson one on windows. It looks like cnn_learner is trying to download models.resnet34 to an invalid path.

Anyone have any ideas on how I should proceed?