Advent of 2022, Day 21 – Using Azure Machine Learning terminal
This article is originally published at https://tomaztsql.wordpress.com
In the series of Azure Machine Learning posts:
- Dec 01: What is Azure Machine Learning?
- Dec 02: Creating Azure Machine Learning Workspace
- Dec 03: Understanding Azure Machine Learning Studio
- Dec 04: Getting data to Azure Machine Learning workspace
- Dec 05: Creating compute and cluster instances in Azure Machine Learning
- Dec 06: Environments in Azure Machine Learning
- Dec 07: Introduction to Azure CLI and Python SDK
- Dec 08: Python SDK namespaces for workspace, experiments and models
- Dec 09: Python SDK namespaces for environment, and pipelines
- Dec 10: Connecting to client using Python SDK namespaces
- Dec 11: Creating Pipelines with Python SDK
- Dec 12: Creating jobs
- Dec 13: Automated ML
- Dec 14: Registering the models
- Dec 15: Getting to know MLflow
- Dec 16: MLflow in action with xgboost
- Dec 17: Building responsible AI dashboard with Python SDK
- Dec 18: Statistical analysis, plotting graphs and feature engineering
- Dec 19: Statistical analysis and ML comparison of prediction models
- Dec 20: Handling kernels, python packages, YAML files in notebooks and keeping structure and good practices
Using Azure CLI can help you progress faster, make repetitve tasks automated and even use the GIT integration, for faster and better collaboration.
So we have created a YAML file on Day20 and we can use it also with Azure CLI to create an environment.
name: aml_sweep channels: - anaconda - conda-forge dependencies: - python==3.10.4 - mlflow==1.26.0 - yapf==0.31.0 - pylint==2.12.2 - mypy==0.910 - pip==21.2.3 - pip: - types-tqdm==22.214.171.124 - pandas-stubs==126.96.36.199012
And with opening terminal
With YAML file in place, simply just call your standard conda command:
conda env create -f environment.yaml
and simply call the environment with
conda activate env /anaconda/envs/azureml_py38_PT_TF
Creating an computer instance is also an easy way to create using Azure CLI
az ml compute create -f create_cluster.yaml
YAML definition is (name of file is create_cluster.yaml):
$schema: https://azuremlschemas.azureedge.net/latest/amlCompute.schema.json name: AMLBlog2022-ds4-v2 type: amlcompute size: Standard_DS11_v2 min_instances: 0 max_instances: 1
and you will get a new compute cluster defined as:
prior to creating a compute, make sure to be logged in. You can always do this with az login.
With Azure CLI you can create any asset, from pipelines, datastores, datasets, deployment jobs, inference models, endpoints, and many many others.
Compete set of code, documents, notebooks, and all of the materials will be available at the Github repository: https://github.com/tomaztk/Azure-Machine-Learning
Happy Advent of 2022!
Please visit source website for post related comments.