CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-azure-mgmt-machinelearningcompute

Microsoft Azure Machine Learning Compute Management Client Library for Python

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

system-operations.mddocs/

System Operations

System-level operations for managing available API operations and system services within clusters. These operations provide discovery and management capabilities for the Azure Machine Learning Compute service.

Capabilities

API Operations Discovery

Operations for discovering available API operations and their metadata, useful for building dynamic clients or documentation.

class MachineLearningComputeOperations:
    """Operations for general Machine Learning Compute management."""
    
    def list_available_operations(
        self,
        custom_headers: Dict[str, str] = None,
        raw: bool = False
    ) -> AvailableOperations:
        """
        Gets all available operations for the Microsoft.MachineLearningCompute resource provider.
        
        Args:
            custom_headers (dict, optional): Headers to add to the request
            raw (bool): Returns direct response alongside deserialized response
            
        Returns:
            AvailableOperations: Container with list of available API operations
            
        Raises:
            CloudError: Service error occurred
        """

Usage Example:

# Get all available operations
operations = client.machine_learning_compute.list_available_operations()

# Iterate through available operations
for operation in operations.value:
    print(f"Operation: {operation.name}")
    print(f"Display Name: {operation.display.operation}")
    print(f"Provider: {operation.display.provider}")
    print(f"Resource: {operation.display.resource}")
    print(f"Description: {operation.display.description}")
    print("---")

# Filter operations by type
cluster_operations = [
    op for op in operations.value 
    if "operationalizationClusters" in op.name
]

print(f"Found {len(cluster_operations)} cluster operations")

Operation Response Models

AvailableOperations

Container for the list of available API operations.

class AvailableOperations:
    """
    Container for available operations.
    
    Attributes:
        value (List[ResourceOperation]): List of available operations
    """
    value: List[ResourceOperation]

ResourceOperation

Individual API operation definition with metadata.

class ResourceOperation:
    """
    API operation definition.
    
    Attributes:
        name (str): Operation name (e.g., "Microsoft.MachineLearningCompute/operationalizationClusters/read")
        display (ResourceOperationDisplay): Display information for the operation
        origin (str): The operation origin
    """
    name: str
    display: ResourceOperationDisplay
    origin: str

ResourceOperationDisplay

Display information for API operations, used in Azure portal and documentation.

class ResourceOperationDisplay:
    """
    Display information for a resource operation.
    
    Attributes:
        provider (str): Service provider (e.g., "Microsoft Machine Learning Compute")
        resource (str): Resource type (e.g., "Operationalization Cluster") 
        operation (str): Operation description (e.g., "Create or Update Operationalization Cluster")
        description (str): Detailed operation description
    """
    provider: str
    resource: str
    operation: str
    description: str

Usage Example:

# Explore operation metadata
operations = client.machine_learning_compute.list_available_operations()

for op in operations.value:
    if "create" in op.display.operation.lower():
        print(f"Create Operation: {op.name}")
        print(f"  Resource: {op.display.resource}")
        print(f"  Description: {op.display.description}")

Integration with Azure Resource Manager

The system operations integrate with Azure's Resource Manager infrastructure:

# This operation provides the same information available through:
# az provider operation list --namespace Microsoft.MachineLearningCompute

operations = client.machine_learning_compute.list_available_operations()

# Can be used to build custom tooling, documentation, or validation
operation_names = [op.name for op in operations.value]
print(f"Total operations: {len(operation_names)}")

# Check if specific operations are available
cluster_create_available = any(
    "operationalizationClusters/write" in op.name 
    for op in operations.value
)
print(f"Cluster creation available: {cluster_create_available}")

Error Handling

System operations use standard Azure error handling patterns:

from azure.core.exceptions import ClientAuthenticationError, HttpResponseError

try:
    operations = client.machine_learning_compute.list_available_operations()
except ClientAuthenticationError:
    print("Authentication failed - check credentials")
except HttpResponseError as e:
    print(f"HTTP error: {e.status_code} - {e.message}")
except Exception as e:
    print(f"Unexpected error: {e}")

Install with Tessl CLI

npx tessl i tessl/pypi-azure-mgmt-machinelearningcompute

docs

client-management.md

cluster-operations.md

index.md

models-types.md

system-operations.md

tile.json