Microsoft Azure Azure Machine Learning Client Library for Python
Project description
Azure ML Package client library for Python
We are excited to introduce the public preview of Azure Machine Learning Python SDK v2. The Python SDK v2 introduces new SDK capabilities like standalone local jobs, reusable components for pipelines and managed online/batch inferencing. Python SDK v2 allows you to move from simple to complex tasks easily and incrementally. This is enabled by using a common object model which brings concept reuse and consistency of actions across various tasks. The SDK v2 shares its foundation with the CLI v2 which is currently in also in public preview.
Source code | Package (PyPI) | API reference documentation | Product documentation | Samples
This package has been tested with Python 3.6, 3.7, 3.8, 3.9 and 3.10.
For a more complete set of Azure libraries, see https://aka.ms/azsdk/python/all
Getting started
Prerequisites
- Python 3.6 later is required to use this package.
- You must have an Azure subscription.
- An Azure Machine Learning Workspace.
Install the package
Install the Azure ML client library for Python with pip:
pip install azure-ai-ml
Authenticate the client
from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential
ml_client = MLClient(
DefaultAzureCredential(), subscription_id, resource_group, workspace
)
Key concepts
Azure Machine Learning Python SDK v2 comes with many new features like standalone local jobs, reusable components for pipelines and managed online/batch inferencing. The SDK v2 brings consistency and ease of use across all assets of the platform. The Python SDK v2 offers the following capabilities:
- Run Standalone Jobs - run a discrete ML activity as Job. This job can be run locally or on the cloud. We currently support the following types of jobs:
- Command - run a command (Python, R, Windows Command, Linux Shell etc.)
- Sweep - run a hyperparameter sweep on your Command
- Run multiple jobs using our improved Pipelines
- Run a series of commands stitched into a pipeline (New)
- Components - run pipelines using reusable components (New)
- Use your models for Managed Online inferencing (New)
- Use your models for Managed batch inferencing
- Manage AML resources – workspace, compute, datastores
- Manage AML assets - Datasets, environments, models
- AutoML - run standalone AutoML training for various ml-tasks:
- Classification (Tabular data)
- Regression (Tabular data)
- Time Series Forecasting (Tabular data)
- Image Classification (Multi-class) (New)
- Image Classification (Multi-label) (New)
- Image Object Detection (New)
- Image Instance Segmentation (New)
- NLP Text Classification (Multi-class) (New)
- NLP Text Classification (Multi-label) (New)
- NLP Text Named Entity Recognition (NER) (New)
Examples
- View our samples.
Troubleshooting
General
Azure ML clients raise exceptions defined in Azure Core.
from azure.core.exceptions import HttpResponseError
try:
ml_client.compute.get("cpu-cluster")
except HttpResponseError as error:
print("Request failed: {}".format(error.message))
Logging
This library uses the standard logging library for logging. Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO level.
Detailed DEBUG level logging, including request/response bodies and unredacted
headers, can be enabled on a client with the logging_enable
argument.
See full SDK logging documentation with examples here.
Next steps
- View our samples.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file azure-ai-ml-0.1.0b5.zip
.
File metadata
- Download URL: azure-ai-ml-0.1.0b5.zip
- Upload date:
- Size: 2.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.28.1 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6359e9e5262bc73305760686804498afd9ee2fb32136ec58c74e1fdc9456ddb7 |
|
MD5 | ba8e4258ef24612851545c1a77abd856 |
|
BLAKE2b-256 | 5cfbf706efa8910de3f29b3ba09f9b44c20ee3750c3413793cd66ba55b254b78 |
File details
Details for the file azure_ai_ml-0.1.0b5-py3-none-any.whl
.
File metadata
- Download URL: azure_ai_ml-0.1.0b5-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.28.1 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5558f7052ea86d13f3893caccecf6300a60b084c4cd798c957aa8148dede1014 |
|
MD5 | 67d9c7f2ee3eea008c086ebb76aa673b |
|
BLAKE2b-256 | 903edeeaf695ffe1fdf8a17b00d0a9efea68efc62794850b76d02fff9a3e331c |