When Jeremy tweeted about new fastai-v2, I wanted to jump and start learning about the new version of fastai and contribute to it. But I did not know where to start. Luckily Jeremy posted about code walk-thrus and in his first code walk-thru he gave suggestions on how to get started. This post is on how to get started based on Jeremy suggestions.
The code is available in https://github.com/fastai/fastai_dev.
Clone the fastai-dev repository. git clone https://github.com/fastai/fastai_dev.git
Inside the fastai-dev folder you would find the dev folder which contains all the notebooks like 01_core.ipynb,08_pets_tutorial.ipynb etc.
There are 2 approaches to install the required packages for running fastai.
One approach is to use the environment.yml from the root of fastai-dev folder to create a seperate environment using conda. You can use the below command for it.
conda env create -f environment.yml
Another approach is to just install everything using conda based on the readme in fastai_dev branch.
conda install -c fastai -c pytorch jupyter "pytorch>=1.2.0" torchvision matplotlib pandas requests pyyaml fastprogress pillow scipy
pip install typeguard jupyter_nbextensions_configurator
Once you have cloned and installed the required libraries run the following from inside your fastai_dev repository.
We just need to run the above command once. What is does is it set things up, so that when we do a pull/push request it cleans all the extraneous stuff in the notebooks which tends to cause conflicts. When you run a pull/push request it runs a python program which removes any extraneous stuff.
We are all set to explore fastai_dev.
We may be tempted to look into 01_core.ipynb which Jeremy warns to avoid doing so as it is very complicated as it sets up python in a different way. It starts with Metaclasses, decorators, type checking, monkey patching, context managers. If you are keen in learning advanced python concepts then it would be the right place to look. Jeremy recommends to start from 08_pets_tutorial.ipynb which is a tutorial notebook and shows how to use some of the low level fastai functionalities like Transforms, fastai lists, pipelines.