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.
Inside the fastai2 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
After you clone this repository, please run nbdev_install_git_hooks in your terminal. This sets up git hooks, which clean up the notebooks to remove the extraneous stuff stored in the notebooks (e.g. which cells you ran) which causes unnecessary merge conflicts.
We are all set to explore fastai2.
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.
You can also watch the video where Jeremy did a code walk-thrus.
Iām new to fast.ai and coding in general. Right iām thinking where would be ideal place to start my path? Is it the latest material or from the very beginning?
@jeremy - symlink was my thought too - ran into problems when I called it fai2 but if I named symlink local it seemed ok. I forget which files I was importing that didnāt have relative imports will post more tomorrow when in front of computer
I must be missing something very basic in getting starting - how to import fastai package in my project.
I followed the instructions to clone the repository and Iām able to run the notebooks and follow the walkthroughs, everything works there.
But now I want to use it in my project, which has other notebooks or code files, in another path.
How can I import āfastaiā packages?
Do I need to set up a PYTHONPATH?
Do I need to deploy it to site-packages?
I donāt see a āfastaiā folder, only a ālocalā one (like referred in the pets tutorial).
We see in the code walk through Jeremy seamlessly uses WSL to launch Jupyter Notebooks for development purpose.
I tried doing the same from my Windows 10 system -> created fast_ai enviroment -> launched Lec 08 Notebook. But it keeps mentioning Connection failed (Cannot establish connection to kernel).
Did anyone else face the same issue before ? If so, whatās the fix ?