- Goto to new ML workspace (Called Studio now)
- Navigate to
Notebooksin the left nav - Expand the
Azure ML gallery➡️Samples➡️Python➡️1.x.x - Hover over
How-to-use-azureml➡️ click on the three dots displayed in the right side ➡️ clickClone.
Now you will see the folder under your user files below.
- Navigate to
Computein the left nav - Notebook VM Tab: Click
+New-> choose a name and VM type (e.g. STANDARD_DS13_V2 which has 8 VCPUs) - Click Create
- Once the Notebook VM is provisioned, you will see three links:
JupyterLab,JupyterandR-Studio. OpenJupyterand follow next steps.
-
In
Jupyter, open the notebooktrain-on-amlcompute.ipynb, in the folder/howto-use-azureml/training/train-on-amlcompute
It will prompt you to select a kernel: selectPython 3.6 AzureMLand click buttonSet Kernel. If you miss it accidentally, you can set it by going to top menu of the notebook:Kernel->Change kernel -
Run the notebook cell by cell
- Important:
- When you are running the cells, it will ask you for interactive authentication: you need to follow the steps (follow the link and enter the supplied code).
- In the notebook no need to run from Section
Provision as a persistent compute target (Advanced)onwards
- Important:
-
After training is done, cleanup the compute cluster: In the last line uncomment this and execute
cpu_cluster.delete() -
Explore your experiment run:
- In the new Azure ML workspace, navigate to the
Experimentssection in left nav - Click on experiment name
train-on-amlcompute->Run - Navigate to the
Metrics tab. Checkalphaandmseif not already checked - Navigate to
Outputstab and you can see all the model files (pkl files) created bytrain.py. In the train.py you will see the model files are stored in ./outputs directory. Azure ML framework automatically moves all files in the outputs folder to the cloud workspace (including logs)
- In the new Azure ML workspace, navigate to the
-
Take time to understand the code in the notebook and
train.pyTime permitting you can try this: In Jupyter landing page -> top nav
How to use Azure ML->Ml Frameworks->Scikit Learn-> click clone ontrain-hyperparameter-tune-deploy-with-sklearn. This uses the diabetes dataset used by the next section (Deploy).
- In
Jupyter, open the notebookmodel-register-and-deploy.ipynb, in the folderhowto-use-azureml/deployment/deploy-to-cloud/ - Run the notebook cell by cell
Note: Before running the last cell that deletes the deployed service, goto the new ML workspace and checkoutEndpointsin the left nav - Take time to understand the code in the notebook and
score.py
- Leverage AutoML via Azure ML Python SDK :Execute any automl notebook excercise from
MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning - Leverage Databricks via Azure ML Python SDK : This is bit more involved as you need to execute this from Databricks workspace. Details are here:
MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning/azure-databricks/README.md
Wait for the discussion to be over in the workshop before cleaning up.
You can cleanup following instructions here