or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

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

index.mddocs/

0

# Azure Machine Learning Compute Management

1

2

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.

3

4

## Package Information

5

6

- **Package Name**: azure-mgmt-machinelearningcompute

7

- **Language**: Python

8

- **Installation**: `pip install azure-mgmt-machinelearningcompute`

9

10

## Core Imports

11

12

```python

13

from azure.mgmt.machinelearningcompute import MachineLearningComputeManagementClient

14

```

15

16

Common imports for models and types:

17

18

```python

19

from azure.mgmt.machinelearningcompute.models import (

20

OperationalizationCluster,

21

ClusterType,

22

OperationStatus,

23

StorageAccountProperties,

24

ContainerRegistryProperties,

25

AcsClusterProperties

26

)

27

```

28

29

## Basic Usage

30

31

```python

32

from azure.identity import DefaultAzureCredential

33

from azure.mgmt.machinelearningcompute import MachineLearningComputeManagementClient

34

from azure.mgmt.machinelearningcompute.models import (

35

OperationalizationCluster,

36

ClusterType,

37

StorageAccountProperties

38

)

39

40

# Initialize the client

41

credential = DefaultAzureCredential()

42

subscription_id = "your-subscription-id"

43

client = MachineLearningComputeManagementClient(credential, subscription_id)

44

45

# Create a simple local cluster

46

cluster_params = OperationalizationCluster(

47

location="eastus",

48

cluster_type=ClusterType.local,

49

description="My ML compute cluster",

50

storage_account=StorageAccountProperties(

51

resource_id="/subscriptions/.../storageAccounts/mystorage"

52

)

53

)

54

55

# Create the cluster

56

operation = client.operationalization_clusters.create_or_update(

57

resource_group_name="myresourcegroup",

58

cluster_name="mycluster",

59

parameters=cluster_params

60

)

61

62

# Wait for completion (long-running operation)

63

cluster = operation.result()

64

print(f"Cluster created: {cluster.name}")

65

66

# List clusters in the resource group

67

clusters = client.operationalization_clusters.list_by_resource_group("myresourcegroup")

68

for cluster in clusters:

69

print(f"Found cluster: {cluster.name}")

70

```

71

72

## Architecture

73

74

The library follows Azure SDK for Python conventions and provides:

75

76

- **Management Client**: Primary entry point (`MachineLearningComputeManagementClient`) that coordinates operations

77

- **Operations Groups**: Specialized operation handlers for different resource types

78

- `operationalization_clusters`: Cluster lifecycle management

79

- `machine_learning_compute`: General compute operations

80

- **Models**: Data structures representing Azure resources and their properties

81

- **Long-running Operations**: Asynchronous operations using Azure polling patterns

82

- **Authentication**: Integration with Azure Identity for secure access

83

84

## Capabilities

85

86

### Client Management

87

88

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

89

90

```python { .api }

91

class MachineLearningComputeManagementClient:

92

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

93

94

class MachineLearningComputeManagementClientConfiguration:

95

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

96

```

97

98

[Client Management](./client-management.md)

99

100

### Operationalization Cluster Operations

101

102

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

103

104

```python { .api }

105

class OperationalizationClustersOperations:

106

def create_or_update(self, resource_group_name: str, cluster_name: str, parameters: OperationalizationCluster) -> AzureOperationPoller: ...

107

def get(self, resource_group_name: str, cluster_name: str) -> OperationalizationCluster: ...

108

def delete(self, resource_group_name: str, cluster_name: str, delete_all: bool = None) -> AzureOperationPoller: ...

109

def list_keys(self, resource_group_name: str, cluster_name: str) -> OperationalizationClusterCredentials: ...

110

```

111

112

[Cluster Operations](./cluster-operations.md)

113

114

### System Operations

115

116

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

117

118

```python { .api }

119

class MachineLearningComputeOperations:

120

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

121

```

122

123

[System Operations](./system-operations.md)

124

125

### Data Models and Types

126

127

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

128

129

```python { .api }

130

class OperationalizationCluster(Resource):

131

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

132

133

class StorageAccountProperties:

134

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

135

136

class ClusterType(Enum):

137

acs = "ACS"

138

local = "Local"

139

```

140

141

[Models and Types](./models-types.md)

142

143

## Types

144

145

```python { .api }

146

from typing import Union, List, Dict, Optional

147

from msrestazure.azure_operation import AzureOperationPoller

148

from msrest.pipeline import ClientRawResponse

149

150

# Core enums

151

ClusterType = Union["ACS", "Local"]

152

OperationStatus = Union["Unknown", "Updating", "Creating", "Deleting", "Succeeded", "Failed", "Canceled"]

153

OrchestratorType = Union["Kubernetes", "None"]

154

SystemServiceType = Union["None", "ScoringFrontEnd", "BatchFrontEnd"]

155

AgentVMSizeTypes = Union[str] # Extensive list of Azure VM sizes

156

Status = Union["Enabled", "Disabled"]

157

UpdatesAvailable = Union["Yes", "No"]

158

```