Fastai-v2 FAQ and links (read this before posting please!)

This category is for discussing the development of fastai v2. The reason we are rewriting fastai from scratch is discussed here. Currently it’s in an early stage. It’s heavily based on the latest (2019) “Deep Learning From The Foundations” course so be sure to complete that, if you want to understand what’s going on. The lib, tests, and docs are all generated from a single set of notebooks. Also, (incomplete) documentation is available.

We’d love help with documenting, testing, and pretty much everything else. So if you’d like to help out, just dive in, and let us know when you have questions!

FAQ:

Where can I get more info?

Here’s some useful forum topics:

How do I set this up in Google Colaboratory?

Run the following in your first cell of the notebook to install the needed libraries.

!pip install fastai2

A side note for windows:
Currently, pytorch==1.2.0 torchvision==0.4.0 is recomended and working (1.3.1 is not available on offical pytorch site and 1.4 is most recent but not working properly.)

How should I try to use the dev version of the library?

When using the dev version, you should install both the dev version of fastai2 and the dev version of fastcore like so:

!pip install git+https://github.com/fastai/fastcore.git
!pip install git+https://github.com/fastai/fastai2.git

Another way is to define all the repositories you want to use (fastcore and fastai2) inside of your .bashrc:

git_pull_all ()
{
    pushd ~/git;
    parallel -a repos 'echo {} && cd ~/git/{} && git pull';
    popd
}

All the repos I want to keep up to date are in ~/git , and in there is a file ~/git/repos with all the repo names I want to keep up to date listed, one per line. (This assumes you have GNU parallel installed).

  • Thanks to Jeremy for this one :slight_smile:

How do I install this on GCP?

pip install packaging
git clone https://github.com/fastai/fastai2
cd fastai2
pip install -e .[dev]

How do I navigate the documentation and find its notebook?

Each page in the documentation is made from a notebook under the nbs folder. You can check what notebook it is by looking at that particular URL. For example, if I want to find what notebook is the Transfer Learning Tutorial, it has the URL http://dev.fast.ai/tutorial.transfer_learning. Which then implies that its corresponding notebook is 22_tutorial.transfer_learning (match the tutorial and transfer_learning)

99 Likes

I may be jumping the gun as its still running, but I’m just creating a conda env on windows and pytorch says 1.3.1

@Brad_S, I’m the one who edited it. As it’s mentioned 1.3.1 is not available for download from pytorch site. If you get conda install from anaconda site it may find the package and I know it was working… But, I’m still not sure if it is gpu supported version.

Not sure whether this is the right place, but I seamlessly installed fastai2 on linux. Would be nice to do it on windows too.

I’m trying to do a windows install with pytorch 1.2.0, but fastai2 demands >=1.3…

ERROR: Could not find a version that satisfies the requirement torch>=1.3.0 (from fastai2) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.3.0 (from fastai2)

Any known workaround?
Thanks.

Try to install pytorch using the conda instructions they provide.

Indeed it worked. Thanks @sgugger, sometimes one overlooks the most obvious solutions… Maybe it would be worth to put this in the FAQ…

Any PR that adds troubleshooting instructions is more than welcome :slight_smile:

1 Like

Should I PR the book nbs or the course nbs? (Or something else?)

Meanwhile, for those of you who use windows, be sure of setting num_workers=0 into the dataloader to disable smp.

more info: https://pytorch.org/docs/stable/notes/windows.html#cuda-ipc-operations

2 Likes

Both?

1 Like

(I’m waiting for accumulating other potentially useful stuff for windows, as I test my setup, so not to clog you with many PRs. Thanks)

3 Likes

When will the deep learning and machine learning courses be updated on fastaiv2?
can we acclimatize the v2 without going for the fastaiv1?

Part 1 of the DL course (part 1 v3) is available under courses/

Aspects of ML (for tabular) were discussed in the most recent course, so you’ll have to wait for the public release

You can, I still recommend part 1 v3 if possible, Jeremy has some walkthroughs and I have my Walk with fastai2 videos to acclimate (and soon a new part 1 that just finished will be released as well)

Any news on the release date of Jeremy’s fastai v2 course? I thought it was going to go up online in Jun?