Skip to content

Latest commit

 

History

History
 
 

cli

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
page_type languages products description
sample
azurecli
azure-machine-learning
Top-level directory for official Azure Machine Learning CLI sample code.

Azure Machine Learning 2.0 CLI (preview) examples

cleanup code style: black license: MIT

Welcome to the Azure Machine Learning examples repository!

Prerequisites

  1. An Azure subscription. If you don't have an Azure subscription, create a free account before you begin.
  2. A terminal. Install and set up the 2.0 machine learning extension before you begin.

Set up

Clone this repository:

git clone https://github.com/Azure/azureml-examples --depth 1
cd azureml-examples/cli

Run the set up script to create an Azure resource group, machine learning workspace, and set defaults for --resource-group/g and --workspace/w:

bash setup.sh

You also need remote compute targets for most examples:

bash create-compute.sh

Hello world

Run the "hello world" job:

az ml job create -f jobs/hello-world.yml --web --stream

Examples

Scripts

path status
batch-score.sh batch-score
create-compute.sh create-compute
deploy-declarative-safe-rollout-online-endpoints.sh deploy-declarative-safe-rollout-online-endpoints
deploy-imperative-safe-rollout-online-endpoints.sh deploy-imperative-safe-rollout-online-endpoints
deploy-managed-online-endpoint-access-resource-sai.sh deploy-managed-online-endpoint-access-resource-sai
deploy-managed-online-endpoint-access-resource-uai.sh deploy-managed-online-endpoint-access-resource-uai
deploy-managed-online-endpoint.sh deploy-managed-online-endpoint
deploy-r.sh deploy-r
deploy-rest.sh deploy-rest
deploy-tfserving.sh deploy-tfserving
deploy-torchserve.sh deploy-torchserve
deploy-triton-ensemble-managed-online-endpoint.sh deploy-triton-ensemble-managed-online-endpoint
deploy-triton-managed-online-endpoint.sh deploy-triton-managed-online-endpoint
deploy-triton-multiple-models-online-endpoint.sh deploy-triton-multiple-models-online-endpoint
hello-world.sh hello-world
how-to-deploy-amlarc-endpoint.sh how-to-deploy-amlarc-endpoint
how-to-deploy-declarative-safe-rollout-amlarc-endpoints.sh how-to-deploy-declarative-safe-rollout-amlarc-endpoints
manage-resources.sh manage-resources
misc.sh misc
train-rest.sh train-rest
train.sh train

Jobs (jobs)

path status description
jobs/logging/sklearn/iris/job.yml jobs/logging/sklearn/iris/job Train a scikit-learn knn model on the iris dataset. Showcases examples of mlflow logging API's used in training.
jobs/train/fastai/mnist/job.yml jobs/train/fastai/mnist/job Train a RESNET-18 convolutional neural network (CNN) with fast.ai on the MNIST dataset.
jobs/train/fastai/pets/job.yml jobs/train/fastai/pets/job Fine tune a convolutional neural network (CNN) with fast.ai on a pets dataset.
jobs/train/lightgbm/iris-bash/job.yml jobs/train/lightgbm/iris-bash/job Train a LightGBM model on the Iris dataset via Python via Bash script.
jobs/train/lightgbm/iris/job-sweep.yml jobs/train/lightgbm/iris/job-sweep Run a hyperparameter sweep job for LightGBM on Iris dataset.
jobs/train/lightgbm/iris/job.yml jobs/train/lightgbm/iris/job Train a LightGBM model on the Iris dataset.
jobs/train/pytorch/word-language-model/job.yml jobs/train/pytorch/word-language-model/job Train a multi-layer RNN (Elman, GRU, or LSTM) on a language modeling task with PyTorch.
jobs/train/r/accidents/job.yml jobs/train/r/accidents/job Train a GLM using R on the accidents dataset.
jobs/train/r/iris/job.yml jobs/train/r/iris/job Train an R model on the Iris dataset.
jobs/train/tensorflow/iris/job.yml jobs/train/tensorflow/iris/job Train a Tensorflow Decision Forest on the Iris dataset.
jobs/train/tensorflow/mnist-distributed-horovod/job.yml jobs/train/tensorflow/mnist-distributed-horovod/job Train a basic neural network with TensorFlow on the MNIST dataset, distributed via Horovod.
jobs/train/tensorflow/mnist-distributed/job.yml jobs/train/tensorflow/mnist-distributed/job Train a basic neural network with TensorFlow on the MNIST dataset, distributed via TensorFlow.
jobs/train/tensorflow/mnist/job.yml jobs/train/tensorflow/mnist/job Train a basic neural network with TensorFlow on the MNIST dataset.
jobs/hello-world-env-var.yml jobs/hello-world-env-var no description
jobs/hello-world.yml jobs/hello-world no description

Endpoints (endpoints)

path status description

Assets (assets)

path status description
assets/data/iris-url.yml assets/data/iris-url Data asset pointing to Iris CSV on public blob storage.
assets/environment/python-ml-basic-cpu.yml assets/environment/python-ml-basic-cpu Environment asset created from a base Docker image plus a Conda environment file.
assets/model/lightgbm-iris.yml assets/model/lightgbm-iris Model asset from local directory.

Contents

directory description
assets assets
endpoints endpoints
jobs jobs

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