Last active
August 22, 2020 17:49
-
-
Save Isaac-Flath/fc55ba19b47eaab9214bade03f2f89ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# The Goal\n", | |
"\n", | |
"The goal is from a fresh environment submit a PR to fastai for contributing. I believe this includes:\n", | |
"\n", | |
"##### Setup\n", | |
"1. Create Conda Environment\n", | |
"1. Fork fastcore and fastai\n", | |
"1. Editable install of fastcore and fastai\n", | |
"1. Running nbdev_install_git_hooks\n", | |
"\n", | |
"#### Contributing\n", | |
"1. Update your fork\n", | |
"1. Once all changes are made run nbdev_build_lib\n", | |
"1. git add/commit/push to fork (FAILURE)\n", | |
"1. Create PR\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Setup Steps" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Create Conda Environment\n", | |
"\n", | |
"These are the steps I took pre-this notebook. This notebook is in a new conda environment.\n", | |
"\n", | |
"```\n", | |
"conda create --name newenv\n", | |
"conda activate newenv\n", | |
"conda install -c conda-forge notebook\n", | |
"conda install -c anaconda nb_conda\n", | |
"```" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"!rm -Rf ./fast*" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"heading_collapsed": true | |
}, | |
"source": [ | |
"### Fork fastcore and fastai\n", | |
"\n", | |
"I forked the repos using github web interface using these steps:\n", | |
"1. Go to github.com/fastai/fastai\n", | |
"1. Click on \"Fork\"\n", | |
"1. Follow prompt" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"heading_collapsed": true | |
}, | |
"source": [ | |
"### Editable Installs\n", | |
"\n", | |
"Installing editable install for fastai and fastcore per reccomendation in fastai repo readme. Starting with an empty directory." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"hidden": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Gist.ipynb\r\n" | |
] | |
} | |
], | |
"source": [ | |
"!ls" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"heading_collapsed": true, | |
"hidden": true | |
}, | |
"source": [ | |
"##### Editable Install of Fastcore" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"hidden": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Cloning into 'fastcore'...\n", | |
"remote: Enumerating objects: 247, done.\u001b[K\n", | |
"remote: Counting objects: 100% (247/247), done.\u001b[K\n", | |
"remote: Compressing objects: 100% (164/164), done.\u001b[K\n", | |
"remote: Total 1618 (delta 162), reused 139 (delta 78), pack-reused 1371\u001b[K\n", | |
"Receiving objects: 100% (1618/1618), 3.18 MiB | 2.95 MiB/s, done.\n", | |
"Resolving deltas: 100% (1102/1102), done.\n" | |
] | |
} | |
], | |
"source": [ | |
"!git clone https://github.com/Isaac-Flath/fastcore.git" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"hidden": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Obtaining file:///home/isaacflath/fastai-contribution-gist-test/fastcore\n", | |
"Requirement already satisfied: pip in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (20.2.2)\n", | |
"Requirement already satisfied: packaging in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (20.4)\n", | |
"Requirement already satisfied: wheel in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (0.35.1)\n", | |
"Requirement already satisfied: numpy in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (1.19.1)\n", | |
"Requirement already satisfied: dataclasses in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (0.6)\n", | |
"Requirement already satisfied: nbdev>=0.2.39 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (1.0.1)\n", | |
"Requirement already satisfied: matplotlib in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (3.3.1)\n", | |
"Requirement already satisfied: pillow in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (7.2.0)\n", | |
"Requirement already satisfied: torch in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (1.6.0)\n", | |
"Requirement already satisfied: pandas in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore==1.0.1) (1.1.1)\n", | |
"Requirement already satisfied: six in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from packaging->fastcore==1.0.1) (1.15.0)\n", | |
"Requirement already satisfied: pyparsing>=2.0.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from packaging->fastcore==1.0.1) (2.4.7)\n", | |
"Requirement already satisfied: nbformat>=4.4.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbdev>=0.2.39->fastcore==1.0.1) (5.0.7)\n", | |
"Requirement already satisfied: pyyaml in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbdev>=0.2.39->fastcore==1.0.1) (5.3.1)\n", | |
"Requirement already satisfied: nbconvert>=5.6.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbdev>=0.2.39->fastcore==1.0.1) (5.6.1)\n", | |
"Requirement already satisfied: fastscript>=1.0.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbdev>=0.2.39->fastcore==1.0.1) (1.0.0)\n", | |
"Requirement already satisfied: cycler>=0.10 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from matplotlib->fastcore==1.0.1) (0.10.0)\n", | |
"Requirement already satisfied: certifi>=2020.06.20 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from matplotlib->fastcore==1.0.1) (2020.6.20)\n", | |
"Requirement already satisfied: kiwisolver>=1.0.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from matplotlib->fastcore==1.0.1) (1.2.0)\n", | |
"Requirement already satisfied: python-dateutil>=2.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from matplotlib->fastcore==1.0.1) (2.8.1)\n", | |
"Requirement already satisfied: future in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from torch->fastcore==1.0.1) (0.18.2)\n", | |
"Requirement already satisfied: pytz>=2017.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from pandas->fastcore==1.0.1) (2020.1)\n", | |
"Requirement already satisfied: jupyter-core in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbformat>=4.4.0->nbdev>=0.2.39->fastcore==1.0.1) (4.6.3)\n", | |
"Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbformat>=4.4.0->nbdev>=0.2.39->fastcore==1.0.1) (3.2.0)\n", | |
"Requirement already satisfied: ipython-genutils in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbformat>=4.4.0->nbdev>=0.2.39->fastcore==1.0.1) (0.2.0)\n", | |
"Requirement already satisfied: traitlets>=4.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbformat>=4.4.0->nbdev>=0.2.39->fastcore==1.0.1) (4.3.3)\n", | |
"Requirement already satisfied: pygments in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (2.6.1)\n", | |
"Requirement already satisfied: entrypoints>=0.2.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (0.3)\n", | |
"Requirement already satisfied: bleach in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (3.1.5)\n", | |
"Requirement already satisfied: pandocfilters>=1.4.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (1.4.2)\n", | |
"Requirement already satisfied: defusedxml in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (0.6.0)\n", | |
"Requirement already satisfied: mistune<2,>=0.8.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (0.8.4)\n", | |
"Requirement already satisfied: testpath in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (0.4.4)\n", | |
"Requirement already satisfied: jinja2>=2.4 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (2.11.2)\n", | |
"Requirement already satisfied: setuptools in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.4.0->nbdev>=0.2.39->fastcore==1.0.1) (49.6.0.post20200814)\n", | |
"Requirement already satisfied: attrs>=17.4.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.4.0->nbdev>=0.2.39->fastcore==1.0.1) (20.1.0)\n", | |
"Requirement already satisfied: pyrsistent>=0.14.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.4.0->nbdev>=0.2.39->fastcore==1.0.1) (0.16.0)\n", | |
"Requirement already satisfied: decorator in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from traitlets>=4.1->nbformat>=4.4.0->nbdev>=0.2.39->fastcore==1.0.1) (4.4.2)\n", | |
"Requirement already satisfied: webencodings in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from bleach->nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (0.5.1)\n", | |
"Requirement already satisfied: MarkupSafe>=0.23 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from jinja2>=2.4->nbconvert>=5.6.1->nbdev>=0.2.39->fastcore==1.0.1) (1.1.1)\n", | |
"Installing collected packages: fastcore\n", | |
" Running setup.py develop for fastcore\n", | |
"Successfully installed fastcore\n" | |
] | |
} | |
], | |
"source": [ | |
"!pip install -e \"./fastcore/[dev]\"" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"hidden": true | |
}, | |
"source": [ | |
"##### Editable Install of fastai" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"hidden": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Cloning into 'fastai'...\n", | |
"remote: Enumerating objects: 100, done.\u001b[K\n", | |
"remote: Counting objects: 100% (100/100), done.\u001b[K\n", | |
"remote: Compressing objects: 100% (77/77), done.\u001b[K\n", | |
"remote: Total 10198 (delta 35), reused 50 (delta 21), pack-reused 10098\u001b[K\n", | |
"Receiving objects: 100% (10198/10198), 536.85 MiB | 2.82 MiB/s, done.\n", | |
"Resolving deltas: 100% (8047/8047), done.\n", | |
"Submodule 'docs' (https://github.com/fastai/fastai-docs.git) registered for path 'docs'\n", | |
"Cloning into '/home/isaacflath/fastai-contribution-gist-test/fastai/docs'...\n", | |
"remote: Enumerating objects: 131, done. \n", | |
"remote: Counting objects: 100% (131/131), done. \n", | |
"remote: Compressing objects: 100% (98/98), done. \n", | |
"remote: Total 671 (delta 86), reused 56 (delta 32), pack-reused 540 \n", | |
"Receiving objects: 100% (671/671), 78.61 MiB | 3.15 MiB/s, done.\n", | |
"Resolving deltas: 100% (465/465), done.\n", | |
"Submodule path 'docs': checked out '3f7f20ce745e36b3b93d55a0640d94866060bd46'\n" | |
] | |
} | |
], | |
"source": [ | |
"!git clone --recurse-submodules https://github.com/Isaac-Flath/fastai.git" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"hidden": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Obtaining file:///home/isaacflath/fastai-contribution-gist-test/fastai\n", | |
"Requirement already satisfied: pip in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (20.2.2)\n", | |
"Requirement already satisfied: packaging in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (20.4)\n", | |
"Requirement already satisfied: fastcore>=1.0.0 in ./fastcore (from fastai==2.0.2) (1.0.1)\n", | |
"Requirement already satisfied: torchvision>=0.7 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (0.7.0)\n", | |
"Requirement already satisfied: matplotlib in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (3.3.1)\n", | |
"Requirement already satisfied: pandas in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (1.1.1)\n", | |
"Requirement already satisfied: requests in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (2.24.0)\n", | |
"Requirement already satisfied: pyyaml in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (5.3.1)\n", | |
"Requirement already satisfied: fastprogress>=0.2.4 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (1.0.0)\n", | |
"Requirement already satisfied: pillow in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (7.2.0)\n", | |
"Requirement already satisfied: scikit-learn in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (0.23.2)\n", | |
"Requirement already satisfied: scipy in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (1.5.2)\n", | |
"Requirement already satisfied: spacy in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (2.3.2)\n", | |
"Requirement already satisfied: torch>=1.6.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (1.6.0)\n", | |
"Requirement already satisfied: nbdev>=0.2.20 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastai==2.0.2) (1.0.1)\n", | |
"Requirement already satisfied: pyparsing>=2.0.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from packaging->fastai==2.0.2) (2.4.7)\n", | |
"Requirement already satisfied: six in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from packaging->fastai==2.0.2) (1.15.0)\n", | |
"Requirement already satisfied: wheel in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore>=1.0.0->fastai==2.0.2) (0.35.1)\n", | |
"Requirement already satisfied: numpy in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore>=1.0.0->fastai==2.0.2) (1.19.1)\n", | |
"Requirement already satisfied: dataclasses in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from fastcore>=1.0.0->fastai==2.0.2) (0.6)\n", | |
"Requirement already satisfied: kiwisolver>=1.0.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from matplotlib->fastai==2.0.2) (1.2.0)\n", | |
"Requirement already satisfied: cycler>=0.10 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from matplotlib->fastai==2.0.2) (0.10.0)\n", | |
"Requirement already satisfied: certifi>=2020.06.20 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from matplotlib->fastai==2.0.2) (2020.6.20)\n", | |
"Requirement already satisfied: python-dateutil>=2.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from matplotlib->fastai==2.0.2) (2.8.1)\n", | |
"Requirement already satisfied: pytz>=2017.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from pandas->fastai==2.0.2) (2020.1)\n", | |
"Requirement already satisfied: idna<3,>=2.5 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from requests->fastai==2.0.2) (2.10)\n", | |
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from requests->fastai==2.0.2) (1.25.10)\n", | |
"Requirement already satisfied: chardet<4,>=3.0.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from requests->fastai==2.0.2) (3.0.4)\n", | |
"Requirement already satisfied: joblib>=0.11 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from scikit-learn->fastai==2.0.2) (0.16.0)\n", | |
"Requirement already satisfied: threadpoolctl>=2.0.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from scikit-learn->fastai==2.0.2) (2.1.0)\n", | |
"Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (2.0.3)\n", | |
"Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (1.0.2)\n", | |
"Requirement already satisfied: srsly<1.1.0,>=1.0.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (1.0.2)\n", | |
"Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (1.0.0)\n", | |
"Requirement already satisfied: thinc==7.4.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (7.4.1)\n", | |
"Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (4.48.2)\n", | |
"Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (0.7.1)\n", | |
"Requirement already satisfied: plac<1.2.0,>=0.9.6 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (1.1.3)\n", | |
"Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (3.0.2)\n", | |
"Requirement already satisfied: setuptools in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (49.6.0.post20200814)\n", | |
"Requirement already satisfied: blis<0.5.0,>=0.4.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from spacy->fastai==2.0.2) (0.4.1)\n", | |
"Requirement already satisfied: future in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from torch>=1.6.0->fastai==2.0.2) (0.18.2)\n", | |
"Requirement already satisfied: fastscript>=1.0.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbdev>=0.2.20->fastai==2.0.2) (1.0.0)\n", | |
"Requirement already satisfied: nbconvert>=5.6.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbdev>=0.2.20->fastai==2.0.2) (5.6.1)\n", | |
"Requirement already satisfied: nbformat>=4.4.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbdev>=0.2.20->fastai==2.0.2) (5.0.7)\n", | |
"Requirement already satisfied: mistune<2,>=0.8.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (0.8.4)\n", | |
"Requirement already satisfied: pandocfilters>=1.4.1 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (1.4.2)\n", | |
"Requirement already satisfied: entrypoints>=0.2.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (0.3)\n", | |
"Requirement already satisfied: testpath in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (0.4.4)\n", | |
"Requirement already satisfied: jinja2>=2.4 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (2.11.2)\n", | |
"Requirement already satisfied: bleach in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (3.1.5)\n", | |
"Requirement already satisfied: pygments in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (2.6.1)\n", | |
"Requirement already satisfied: defusedxml in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (0.6.0)\n", | |
"Requirement already satisfied: jupyter-core in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (4.6.3)\n", | |
"Requirement already satisfied: traitlets>=4.2 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (4.3.3)\n" | |
] | |
}, | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Requirement already satisfied: ipython-genutils in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbformat>=4.4.0->nbdev>=0.2.20->fastai==2.0.2) (0.2.0)\n", | |
"Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from nbformat>=4.4.0->nbdev>=0.2.20->fastai==2.0.2) (3.2.0)\n", | |
"Requirement already satisfied: MarkupSafe>=0.23 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from jinja2>=2.4->nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (1.1.1)\n", | |
"Requirement already satisfied: webencodings in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from bleach->nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (0.5.1)\n", | |
"Requirement already satisfied: decorator in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from traitlets>=4.2->nbconvert>=5.6.1->nbdev>=0.2.20->fastai==2.0.2) (4.4.2)\n", | |
"Requirement already satisfied: attrs>=17.4.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.4.0->nbdev>=0.2.20->fastai==2.0.2) (20.1.0)\n", | |
"Requirement already satisfied: pyrsistent>=0.14.0 in /home/isaacflath/anaconda3/envs/fastai-contrib-test/lib/python3.8/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.4.0->nbdev>=0.2.20->fastai==2.0.2) (0.16.0)\n", | |
"Installing collected packages: fastai\n", | |
" Running setup.py develop for fastai\n", | |
"Successfully installed fastai\n" | |
] | |
} | |
], | |
"source": [ | |
"!pip install -e \"./fastai/[dev]\"" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Running nbdev_install_git_hooks\n", | |
"\n", | |
"\"After you clone this repository, please run nbdev_install_git_hooks in your terminal.\"" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"fastai\tfastcore Gist.ipynb\r\n" | |
] | |
} | |
], | |
"source": [ | |
"!ls" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"CODE_OF_CONDUCT.md environment.yml Makefile\t settings.ini\r\n", | |
"CONTRIBUTING.md fastai\t MANIFEST.in setup.py\r\n", | |
"dev_nbs\t\t fastai.egg-info nbs\t test_settings.ini\r\n", | |
"docs\t\t LICENSE\t README.md\r\n" | |
] | |
} | |
], | |
"source": [ | |
"import os\n", | |
"os.chdir('fastai')\n", | |
"!ls" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Executing: git config --local include.path ../.gitconfig\r\n", | |
"Success: hooks are installed and repo's .gitconfig is now trusted\r\n" | |
] | |
} | |
], | |
"source": [ | |
"!nbdev_install_git_hooks" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Contributing\n", | |
"\n", | |
"For this I will be doing a PR of the most simple example I could find. This involves moving the abbr.md file from fastai1 to fastai to fix a broken link in the style guide." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Make Changes" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"abbr.md\r\n" | |
] | |
} | |
], | |
"source": [ | |
"!ls ./docs | grep abbr.md" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Once all changes are made run nbdev_build_lib\n", | |
"\n", | |
"I don't think this is needed for the change I am making here, but including it as it shouldn't hurt and if I were making a change to the library I would want to run it." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Converted 00_torch_core.ipynb.\n", | |
"Converted 01_layers.ipynb.\n", | |
"Converted 02_data.load.ipynb.\n", | |
"Converted 03_data.core.ipynb.\n", | |
"Converted 04_data.external.ipynb.\n", | |
"Converted 05_data.transforms.ipynb.\n", | |
"Converted 06_data.block.ipynb.\n", | |
"Converted 07_vision.core.ipynb.\n", | |
"Converted 08_vision.data.ipynb.\n", | |
"Converted 09_vision.augment.ipynb.\n", | |
"Converted 09b_vision.utils.ipynb.\n", | |
"Converted 09c_vision.widgets.ipynb.\n", | |
"Converted 10_tutorial.pets.ipynb.\n", | |
"Converted 11_vision.models.xresnet.ipynb.\n", | |
"Converted 12_optimizer.ipynb.\n", | |
"Converted 13_callback.core.ipynb.\n", | |
"Converted 13a_learner.ipynb.\n", | |
"Converted 13b_metrics.ipynb.\n", | |
"Converted 14_callback.schedule.ipynb.\n", | |
"Converted 14a_callback.data.ipynb.\n", | |
"Converted 15_callback.hook.ipynb.\n", | |
"Converted 15a_vision.models.unet.ipynb.\n", | |
"Converted 16_callback.progress.ipynb.\n", | |
"Converted 17_callback.tracker.ipynb.\n", | |
"Converted 18_callback.fp16.ipynb.\n", | |
"Converted 18a_callback.training.ipynb.\n", | |
"Converted 19_callback.mixup.ipynb.\n", | |
"Converted 20_interpret.ipynb.\n", | |
"Converted 20a_distributed.ipynb.\n", | |
"Converted 21_vision.learner.ipynb.\n", | |
"Converted 22_tutorial.imagenette.ipynb.\n", | |
"Converted 23_tutorial.vision.ipynb.\n", | |
"Converted 24_tutorial.siamese.ipynb.\n", | |
"Converted 24_vision.gan.ipynb.\n", | |
"Converted 30_text.core.ipynb.\n", | |
"Converted 31_text.data.ipynb.\n", | |
"Converted 32_text.models.awdlstm.ipynb.\n", | |
"Converted 33_text.models.core.ipynb.\n", | |
"Converted 34_callback.rnn.ipynb.\n", | |
"Converted 35_tutorial.wikitext.ipynb.\n", | |
"Converted 36_text.models.qrnn.ipynb.\n", | |
"Converted 37_text.learner.ipynb.\n", | |
"Converted 38_tutorial.text.ipynb.\n", | |
"Converted 39_tutorial.transformers.ipynb.\n", | |
"Converted 40_tabular.core.ipynb.\n", | |
"Converted 41_tabular.data.ipynb.\n", | |
"Converted 42_tabular.model.ipynb.\n", | |
"Converted 43_tabular.learner.ipynb.\n", | |
"Converted 44_tutorial.tabular.ipynb.\n", | |
"Converted 45_collab.ipynb.\n", | |
"Converted 46_tutorial.collab.ipynb.\n", | |
"Converted 50_tutorial.datablock.ipynb.\n", | |
"Converted 60_medical.imaging.ipynb.\n", | |
"Converted 61_tutorial.medical_imaging.ipynb.\n", | |
"Converted 65_medical.text.ipynb.\n", | |
"Converted 70_callback.wandb.ipynb.\n", | |
"Converted 71_callback.tensorboard.ipynb.\n", | |
"Converted 72_callback.neptune.ipynb.\n", | |
"Converted 73_callback.captum.ipynb.\n", | |
"Converted 74_callback.cutmix.ipynb.\n", | |
"Converted 97_test_utils.ipynb.\n", | |
"Converted 99_pytorch_doc.ipynb.\n", | |
"Converted index.ipynb.\n", | |
"Converted quick_start.ipynb.\n", | |
"Converted tutorial.ipynb.\n" | |
] | |
} | |
], | |
"source": [ | |
"!nbdev_build_lib" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### git add/commit/push to fork\n", | |
"\n", | |
"Remember that fastai uses Git submodules, so you have to include the flag --recurse-submodules in some of your Git commands (git clone, git pull). Alternatively, you can set the Git configuration option (since Git 2.15):" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"!git config --local submodule.recurse true" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"fatal: Pathspec 'docs/abbr.md' is in submodule 'docs'\r\n" | |
] | |
} | |
], | |
"source": [ | |
"!git add docs/abbr.md" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"On branch master\r\n", | |
"Your branch is up to date with 'origin/master'.\r\n", | |
"\r\n", | |
"Changes not staged for commit:\r\n", | |
"\t\u001b[31mmodified: docs\u001b[m (untracked content)\r\n", | |
"\r\n", | |
"no changes added to commit\r\n" | |
] | |
} | |
], | |
"source": [ | |
"!git commit -m 'Missing file for style guide link'" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"!git push" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Create PR" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python [conda env:fastai-contrib-test] *", | |
"language": "python", | |
"name": "conda-env-fastai-contrib-test-py" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.8.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment