or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

client-management.mdcluster-operations.mdindex.mdmodels-types.mdsystem-operations.md
tile.json

tessl/pypi-azure-mgmt-machinelearningcompute

Microsoft Azure Machine Learning Compute Management Client Library for Python

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/azure-mgmt-machinelearningcompute@0.4.x

To install, run

npx @tessl/cli install tessl/pypi-azure-mgmt-machinelearningcompute@0.4.0

index.mddocs/

Azure Machine Learning Compute Management

A Python client library for managing Azure Machine Learning Compute resources through the Azure Resource Manager (ARM) APIs. This library enables developers to programmatically create, configure, and manage operationalization clusters for Azure Machine Learning services, including support for Kubernetes orchestration, ACS (Azure Container Service) integration, and system services management.

Package Information

  • Package Name: azure-mgmt-machinelearningcompute
  • Language: Python
  • Installation: pip install azure-mgmt-machinelearningcompute

Core Imports

from azure.mgmt.machinelearningcompute import MachineLearningComputeManagementClient

Common imports for models and types:

from azure.mgmt.machinelearningcompute.models import (
    OperationalizationCluster,
    ClusterType,
    OperationStatus,
    StorageAccountProperties,
    ContainerRegistryProperties,
    AcsClusterProperties
)

Basic Usage

from azure.identity import DefaultAzureCredential
from azure.mgmt.machinelearningcompute import MachineLearningComputeManagementClient
from azure.mgmt.machinelearningcompute.models import (
    OperationalizationCluster,
    ClusterType,
    StorageAccountProperties
)

# Initialize the client
credential = DefaultAzureCredential()
subscription_id = "your-subscription-id"
client = MachineLearningComputeManagementClient(credential, subscription_id)

# Create a simple local cluster
cluster_params = OperationalizationCluster(
    location="eastus",
    cluster_type=ClusterType.local,
    description="My ML compute cluster",
    storage_account=StorageAccountProperties(
        resource_id="/subscriptions/.../storageAccounts/mystorage"
    )
)

# Create the cluster
operation = client.operationalization_clusters.create_or_update(
    resource_group_name="myresourcegroup",
    cluster_name="mycluster",
    parameters=cluster_params
)

# Wait for completion (long-running operation)
cluster = operation.result()
print(f"Cluster created: {cluster.name}")

# List clusters in the resource group
clusters = client.operationalization_clusters.list_by_resource_group("myresourcegroup")
for cluster in clusters:
    print(f"Found cluster: {cluster.name}")

Architecture

The library follows Azure SDK for Python conventions and provides:

  • Management Client: Primary entry point (MachineLearningComputeManagementClient) that coordinates operations
  • Operations Groups: Specialized operation handlers for different resource types
    • operationalization_clusters: Cluster lifecycle management
    • machine_learning_compute: General compute operations
  • Models: Data structures representing Azure resources and their properties
  • Long-running Operations: Asynchronous operations using Azure polling patterns
  • Authentication: Integration with Azure Identity for secure access

Capabilities

Client Management

Core client initialization, configuration, and authentication for accessing Azure Machine Learning Compute resources.

class MachineLearningComputeManagementClient:
    def __init__(self, credentials, subscription_id: str, base_url: str = None): ...
    
class MachineLearningComputeManagementClientConfiguration:
    def __init__(self, credentials, subscription_id: str, base_url: str = None): ...

Client Management

Operationalization Cluster Operations

Complete lifecycle management of operationalization clusters including creation, updates, deletion, credential management, and system services.

class OperationalizationClustersOperations:
    def create_or_update(self, resource_group_name: str, cluster_name: str, parameters: OperationalizationCluster) -> AzureOperationPoller: ...
    def get(self, resource_group_name: str, cluster_name: str) -> OperationalizationCluster: ...
    def delete(self, resource_group_name: str, cluster_name: str, delete_all: bool = None) -> AzureOperationPoller: ...
    def list_keys(self, resource_group_name: str, cluster_name: str) -> OperationalizationClusterCredentials: ...

Cluster Operations

System Operations

System-level operations for managing available API operations and system services within clusters.

class MachineLearningComputeOperations:
    def list_available_operations(self) -> AvailableOperations: ...

System Operations

Data Models and Types

Comprehensive data structures representing clusters, configurations, credentials, and enumerations used throughout the API.

class OperationalizationCluster(Resource):
    def __init__(self, location: str, cluster_type: ClusterType, **kwargs): ...

class StorageAccountProperties:
    def __init__(self, resource_id: str = None): ...

class ClusterType(Enum):
    acs = "ACS"
    local = "Local"

Models and Types

Types

from typing import Union, List, Dict, Optional
from msrestazure.azure_operation import AzureOperationPoller
from msrest.pipeline import ClientRawResponse

# Core enums
ClusterType = Union["ACS", "Local"]
OperationStatus = Union["Unknown", "Updating", "Creating", "Deleting", "Succeeded", "Failed", "Canceled"]
OrchestratorType = Union["Kubernetes", "None"]
SystemServiceType = Union["None", "ScoringFrontEnd", "BatchFrontEnd"]
AgentVMSizeTypes = Union[str]  # Extensive list of Azure VM sizes
Status = Union["Enabled", "Disabled"]
UpdatesAvailable = Union["Yes", "No"]