Skip to content

Official community-driven Azure Machine Learning Examples, tested with GitHub Actions

License

Notifications You must be signed in to change notification settings

Totoro-DS/azureml-examples

 
 

Repository files navigation

Azure Machine Learning (AML) Examples

run-examples-badge run-notebooks-badge cleanup code style: black license: MIT

Welcome to the AML examples!

Prerequisites

  1. An Azure subscription. If you don't have an Azure subscription, create a free account before you begin.
  2. Familiarity with Python and Azure Machine Learning concepts.
  3. A terminal and Python >=3.6,<3.9.

Installation

Clone this repository and install required packages:

git clone https://github.com/Azure/azureml-examples
cd azureml-examples
pip install --upgrade -r requirements.txt

To create or setup a workspace with the assets used in these examples, run the setup script.

If you do not have an Azure ML Workspace, run python setup.py --subscription-id $ID, where $ID is your Azure subscription id. A resource group, AML Workspace, and other necessary resources will be created in the subscription.

If you have an Azure ML Workspace, install the Azure ML CLI and run az ml folder attach -w $WS -g $RG, where $WS and $RG are the workspace and resource group names.

By default, python setup.py will not provision all the compute targets needed to run every example in this repository - it will only create standard AML compute targets with auto scaledown and reasonable settings. Some examples will fail with a "compute target not found" error. To create the AKS and specialty AML compute targets, run python setup.py --create-aks True --create-V100 True.

Run python setup.py -h to see other optional arguments.

Samples

Tutorials

path status notebooks description
an-introduction an-introduction 1.hello-world.ipynb
2.pytorch-model.ipynb
3.pytorch-model-cloud-data.ipynb
learn the basics of Azure Machine Learning
automl-with-pycaret automl-with-pycaret 1.classification.ipynb learn how to automate ML with pycaret
deploy-edge deploy-edge ase-gpu.ipynb learn how to use Edge device for model deployment and scoring
deploy-triton deploy-triton 1.densenet-local.ipynb
2.bidaf-aks-v100.ipynb
learn how to efficiently deploy to GPUs using triton inference server
music-with-ml music-with-ml 1.intro-to-magenta.ipynb learn how to create music with ML using magenta
using-dask using-dask 1.intro-to-dask.ipynb
2.eds-at-scale.ipynb
learn how to read from cloud data and scale PyData tools (numpy, pandas, scikit-learn, etc.) with dask
using-mlflow using-mlflow sklearn.ipynb learn how to use AML as the backend for mlflow
using-optuna using-optuna 1.intro-to-optuna.ipynb learn how to optimize an objective function with optuna
using-pytorch-lightning using-pytorch-lightning 1.train-single-node.ipynb
2.log-with-tensorboard.ipynb
3.log-with-mlflow.ipynb
4.train-multi-node-ddp.ipynb
learn how to train and log metrics with PyTorch Lightning
using-rapids using-rapids 1.train-and-hpo.ipynb
2.train-multi-gpu.ipynb
learn how to accelerate PyData tools (numpy, pandas, scikit-learn, etc) on NVIDIA GPUs with rapids

Jupyter Notebooks

path description
notebooks/train-lightgbm-local.ipynb use AML and mlflow to track interactive experimentation in the cloud

Train

path compute environment description
examples/train/deepspeed-cifar.py AML - GPU docker train CIFAR-10 using DeepSpeed and PyTorch
examples/train/fastai-mnist-mlproject.py AML - CPU mlproject train fastai resnet18 model on mnist data via mlflow mlproject
examples/train/fastai-mnist.py AML - CPU conda train fastai resnet18 model on mnist data
examples/train/fastai-pets.py AML - GPU docker train fastai resnet34 model on pets data
examples/train/lightgbm-iris.py AML - CPU pip train a lightgbm model on iris data
examples/train/pytorch-mnist-mlproject.py AML - GPU mlproject train a pytorch CNN model on mnist data via mlflow mlproject
examples/train/pytorch-mnist.py AML - GPU conda train a pytorch CNN model on mnist data
examples/train/sklearn-diabetes-mlproject.py AML - CPU mlproject train sklearn ridge model on diabetes data via mlflow mlproject
examples/train/sklearn-diabetes.py AML - CPU conda train sklearn ridge model on diabetes data
examples/train/tensorflow-iris.py AML - CPU conda train tensorflow NN model on iris data
examples/train/tensorflow-mnist-distributed-horovod.py AML - GPU conda train tensorflow CNN model on mnist data distributed via horovod
examples/train/tensorflow-mnist-distributed.py AML - GPU conda train tensorflow CNN model on mnist data distributed via tensorflow
examples/train/tensorflow-mnist.py AML - GPU conda train tensorflow NN model on mnist data
examples/train/xgboost-iris.py AML - CPU pip train xgboost model on iris data

Deploy

path compute description
examples/deploy/pytorch-mnist-aks-cpu.py AKS - CPU deploy pytorch CNN model trained on mnist data to AKS
examples/deploy/sklearn-diabetes-aks-cpu.py AKS - CPU deploy sklearn ridge model trained on diabetes data to AKS

Contributing

We welcome contributions and suggestions! Please see the contributing guidelines for details.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. Please see the code of conduct for details.

Reference

About

Official community-driven Azure Machine Learning Examples, tested with GitHub Actions

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 50.5%
  • Jupyter Notebook 46.8%
  • JavaScript 2.2%
  • Other 0.5%