Demonstrate basic usage of Azure Machine Learning's Automated ML service. Implements the following:
AzureAIMLWorkspace
: Azure AI ML Studio workspace helper class. generates an authenticated instance of a workspace.AzureAIMLAssetsDataset
: Azure AI ML Studio data set. Provides helpers for managing ML Studio data sets, and for porting to/from kaggle data sets and local csv and Excel files.AzureAIMLStudioComputeCluster
: Azure AI ML Studio Compute - compute cluster object with helpers for instantitation.AzureAIMLStudioAssetsBatchEndpoint
: Azure AI ML Studio Assets - batch end point. Providers helpers for managing end points.AzureAIMLStudioAuthoringAutomatedML
: Azure AI ML Studio Authoring - Automated ML. Helper class for managing life cycle of 'automated ml' jobs.
There is also an example production deployment of a model created using AutomatedML. See important deployment details, here.
Note the following:
-
Model training is a computationally intensive task and it is not free. You'll need a paid Azure Subscription. Expect to spend in the neighborhood of $0.10/per hour ($USD) when training models.
-
This repo is currently based on Python3.9 even though this is several versions behind the latest stable version of Python. DO NOT ARBITRARILY UPGRADE TO LATER VERSIONS OF PYTHON. It will break. This repo is actively maintained. We monitor this. You have been warned.
-
This project leverages Github Actions for automated unit tests, build, deploy, in addition to automating various administrative tasks including for example, automating updates to 3rd party package requirements. Most of these are visible from the Actions tab above.
python3 -m azure_ai.commands.help
python3 -m azure_ai.commands.workspace
python3 -m azure_ai.commands.compute_cluster cluster-name
python3 -m azure_ai.commands.dataset_from_file maths ~/Desktop/gh/fswl/azureml-example/azure_ai/tests/data/maths.csv
python3 -m azure_ai.commands.dataset_from_kaggle titanic heptapod/titanic
Works with Linux, Windows and macOS environments.
-
Verify project requirements: Python 3.9, NPM Docker, and Docker Compose. Docker will need around 1 vCPU, 2Gib memory, and 30Gib of storage space.
-
Run
make
and add your credentials to the newly created.env
file in the root of the repo. -
Create an Azure account. See this summary for account configuration important details that you'll need to address in order for Azure AI AutomatedML batch jobs to run correctly: Azure Account Setup for AutoML
-
Add your Azure
config.json
to the root of this project. See Azure ML Configuration Guide for detailed instructions on setting up an Azure Workspace and Subscription, and downloading yourconfig.json
file. -
Add your Kaggle Api key to .kaggle/kaggle.json, which you can generate from https://www.kaggle.com/settings/account.
-
Install and configure Azure cli. On Mac
brew install azure-cli
. On Windows download from https://aka.ms/installazurecliwindows.az login
az account list --output table
az account set --subscription "your-subscription-id-or-name"
-
Initialize, build and run the application locally.
git clone https://github.com/FullStackWithLawrence/azureml-example.git
make # scaffold a .env file in the root of the repo
#
# ****************************
# STOP HERE!
# ****************************
# Review your .env file located in the project root folder.
#
make init # Initialize Python virtual environment used for code auto-completion and linting
make test # Verify that your Python virtual environment was built correctly and that
# azureml.core finds your config.json file.
#
make docker-build # Build and configure all docker containers
make docker-run # Run docker container
Please report bugs to the GitHub Issues Page for this project.
Please see:
- the Developer Setup Guide
- and these commit comment guidelines 😬😬😬 for managing CI rules for automated semantic releases.
You can also contact Lawrence McDaniel directly.