Shorter version of AzureML Hands on workshop
- 4시간 짜리 요약 버전으로 핵심 내용 위주로 진행합니다.
- Azure에 데이터를 올리는 가장 간단한 방법부터 시작해서, Azure ML workspace를 생성하고 첫 실험을 수행하는 부분, Azure ML의 주요 기능 중에서 선별하여 실습 또는 데모를 통해 체험을 합니다.
- Inference 부분은 시간이 부족하여 MLOps 관점에서 데모 중심으로 커버합니다.
- 본 버전에서는 Client에 설치를 최소화하고 Cloud 환경에서 대부분의 작업을 진행합니다.
- 본 세션으로 Azure ML의 모든 것을 알 수는 없으나 최소한의 개념을 일부라도 직접 체험하고 향후에 기능별로 알아보기 위한 기초를 마련하도록 합니다.
- 시간이 허용된다면 고급 기능의 일부를 알아봅니다:
- Experiment e2e tracking
- Automated ML, HyperDrive
- MLOps
- Distributed Training with SR-IOV
- DeepSpeed
- Enterprise Readiness
-
Prepare
- Check Azure subscription
- All attendee should be able to sign in
- Install
- Internet browser of your choice (Edge is fine, Chrome is also good)
- Azure Storage Explorer
- (optional) Visual Studio Code
- (optional) GitHub Desktop
- Check Azure subscription
-
14:00-14:50 Workshop overview, scope, expectations and getting started
- Create an AML service workspace
- region: Korea Central
- resource group: new (one per person for practice)
- after creation, check
Usage + quotas
, Standard NC Family vCPUs: should have enough available dedicated cores for this workshop (e.g., 5 people * 6 cores * 4 nodes = 120 cores), if we're trying Deep Learning
- (optional) Add users in
Access Control (IAM)
- Use Storage Explorer to upload files
- Note it leverages AzCopy for parallel faster loading
- Key concepts
- Data flow and architecture (pdf)
- (Optional) DevOps pipeline (pdf)
- Azure ML Overview "AI 프로젝트에 필요한 것들"
- Azure ML conceptual diagram
- Create an AML service workspace
-
15:00-15:50 Visit AML studio, create computes and try Notebooks
-
visit https://ml.azure.com/ or https://ml.azure.com?flight=azureNotebooks
-
Learn key concepts
-
Create Compute Instance. Or alternatively you can use your local environment.
- Go to
Compute
>Compute Instance
, create a new VM (STANDARD_D3_V2) - Clone sample git repo. Choose one of the following options.
- Option 1: Use GUI
- Option 2: Use code
- You can do this only when your Compute Instance is running.
- Go to
Compute
>Compute Instance
. Start the Compute Instance if it is not running. ClickJupyterLab
of a running Compute Instance, clickTerminal
- From the home directory
/mnt/azureuser/
, cd (or mkdir if needed, name can by anything you want), git clone withgit clone https://github.com/Azure/MachineLearningNotebooks
- Go to
-
Run Notebooks from the cloud
- You have two ways to do this. Choose one of the following options. Both requires running Compute Instance.
- Option 1: Use studio (UI)
- Go to
Notebooks
>User files
, choose the Jupyter Notebook you want to run. - If no Compute Instance is running, you can start it from
Compute
>Compute Instance
and come back here. - You can specify on which Compute Instance you will run the Notebook.
- You can edit, run and document as you would normally do with Jupyter Notebook.
- Go to
- Option 2: Use Compute Instance Jupyter directly
-
(Optional) In case you want to skip AD authentication and use SSH Tunneling to access services running in the Compute Instance such as Jupyer:
-
Create SSH Key pair using PuTTYgen or any other tools. If you use PuTTYgen,
-
Run
bash
-
Install PuTTYgen if you haven’t, by running
sudo apt install putty-tools
. -
Run the following command to generate the key pair, save the Private Key, then retrieve the Public Key in OpenSSH rsa format which is needed for Compute Instance creation.
puttygen -t rsa -b 2048 -C "azureuser@ci" -o private-key.ppk puttygen private-key.ppk -O public-openssh -o public-key-openssh
If you wanted to set passphrase, refer to the documentation shared above.
-
-
Create Compute Instance using SSH Public Key above
-
Use PuTTY or any other tools to create SSH Tunnel between localhost and remote Compute Instance
-
Now you can browse https://localhost:8000/ to get to Jupyter (and https://localhost:8000/lab for JupyterLab) running remotely in Compute Instance.
-
-
Create Azure ML Compute: To do that, open
configuration.ipynb
under Notebooks- Proceed to create Azure ML Compute
cpucluster
STANDARD_D2_V3, 0 to 4 nodesgpucluster
STANDARD_NC6, 0 to 4 nodes
- Proceed to create Azure ML Compute
-
Try a Notebook: sample - first ml experiment
-
-
16:00-16:50 Try Automated ML
- (Demo) Regression example
- Open sample notebook
auto-ml-regression-hardware-performance-explanation-and-featurization
underhow-to-use-azureml/automated-machine-learning/regression-hardware-performance-explanation-and-featurization
(find this notebook from your notebook environment) - Run (before
run.wait_for_complettion()
cell) - Monitor the Jupyter widget, and the Workspace (from Azure Portal - check Experiment and Compute)
- Additionally, note that files in
./outputs
and./logs
are automatically uploaded to the Workspace. Tensorboard logs should also be saved in this./logs
. Refer to how to train models and TensorBoard integration sample. - Try to understand how the model files are moving, from AML Compute, to Workspace, to local environment.
- Open sample notebook
- (Your turn) Let's try Regression with UI
- Upload the sample orage juice CSV
- Go to
Automated ML
, clickNew Automated ML run
and try regression.- Pick the dataset you uploaded, pick target column.
- Choose the Compute you have created (e.g., CPU cluster)
- Choose
Regression
if that is what you want to run. - Check out
View feaurization settings
- Check out
View additional configuration settings
- Primary Metrics
- Automatic Featurization
- Explain best model
- Blocked algorithms
- Exit criterion
- Validation
- Concurrency
- Click Submit
- Check
Automated ML
(Data guadrails, Models),Experiments
,Compute
- Check
Explainer
- You may try
Deploy best model
from the run.
- (Demo) Regression example
-
17:00-17:50 Check out Designer and MLOps
- Designer
- Try starting a new Pipeline Draft
- Try opening a sample
- Check out quick demos
- MLOps
- Revist the architecture diagram
- Check out quick demos
- Some more additional features
- Build 2019 updates: New Azure Machine Learning updates simplify and accelerate the ML lifecycle
- visual-interface (preview)
- automated ml with GUI (preview)
- interpretability-explainability
- onnx
- fpga
- pipelines
- Enterprise Readiness
- Distributed Training with SR-IOV
- DeepSpeed
- Model Inference Optimization (private)
- custom vision
- Further questions
- Designer