This repository has examples showing you how to use FastAI on Azure ML.
The Azure Machine Learning workspace is the top-level resource for the service. It provides you with a centralized place to work with all the artifacts you create.
You can create an ML workspace by clicking here - specify a unique resource group name for your Azure subscription!:
More details about deployment in the button used above, Check out ARM JSON definition and Azure Machine Learning VM sizes
-
Go to the Azure ML studio (https://ml.azure.com) and find your ML workspace.
-
On the left side, select Notebooks. Select any notebook located in the User files section on the left-hand side. If you don't have any notebooks there, first create a notebook
-
If you don't see the icon, select the ... to the right of the compute target and then select Open terminal .
PRO-TIP: Copy and Paste in Terminal
- Windows:
Ctrl-c
to copy is supported but useShift-insert
to paste.- FireFox/IE may not support clipboard permissions properly.
- Mac OS:
Cmd-c
to copy andCmd-v
to paste.
- Copy the following command to clipboard:
wget https://raw.githubusercontent.com/Azure/AzureML-fastai/main/fastaionAMLCI.sh
bash fastaionAMLCI.sh
If you don't already have fastai, then you have to wait for the libraries and dependencies to install. Wait up to 10 mins for this to complete and continue to the next step.
All of the notebook samples should now be cloned into the fastai folder and ready to run!
- Refresh File Explorer to see all new files.
- If you didn't run into any errors, proceed to Running FastAI Notebook section
- Use the terminal window to create a new environment. For example, the code below creates fastaienv and activate the environment:
conda create -y --name fastaienv
conda activate fastaienv
- Install fastai, nbdev, pip and ipykernel package to the new environment and create a kernel for that conda env:
conda install -y pip
conda install -y ipykernel
conda install -y -c fastai -c pytorch fastai
conda install -y -c fastai fastbook
conda install -y -c fastai nbdev
If you don't already have fastai, then you have to wait for the libraries and dependencies to install. Wait up to 10 mins for this to complete and continue to the next step.
- Create a kernel for that conda env:
python -m ipykernel install --user --name fastaienv --display-name "Python (fastaienv)"
- Clone the Fast AI Repo with below snippet:
git clone https://github.com/fastai/fastai.git
All of the notebook samples should now be cloned into the fastai folder and ready to run!
- Refresh File Explorer to see all new files.
- Open a notebook in
fastai/nbs
you just cloned:
- Always make sure you select the
Python (fastaienv)
Kernel:
- Run all cells in Notebook:
When you're down make sure you stop your compute! If you don't you'll keep getting charged until you click the stop compute button.
When you want to go back to your notebook exercises, just find the notebook in the AzureML Studio and hit Play on any cell.
It will take a few mins to reboot your compute and run you cell. Make sure you have selected the Python (fastaienv)
kernel when you notebook is running.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.