Azure Machine Learning Services Management Client Library

raw JSON →
1.0.0 verified Fri May 01 auth: no python

Microsoft Azure Machine Learning Services Management Client Library for Python. Provides programmatic management of Azure Machine Learning workspaces, compute resources, and other resources. Latest stable version is 1.0.0 (released alongside other Azure SDK packages). Release cadence is irregular, following Azure SDK for Python patterns.

pip install azure-mgmt-machinelearningservices
error ModuleNotFoundError: No module named 'azure.mgmt.machinelearningservices'
cause Package not installed or incorrect import path.
fix
Install with 'pip install azure-mgmt-machinelearningservices' and import as 'from azure.mgmt.machinelearningservices import MachineLearningServicesMgmtClient'
error ImportError: cannot import name 'MachineLearningServicesMgmtClient' from 'azure.mgmt.machinelearningservices'
cause Possible due to outdated package version where the client class name was different.
fix
Upgrade to the latest version: 'pip install --upgrade azure-mgmt-machinelearningservices'. Verify the correct client class name in the docs.
gotcha The package name is 'azure-mgmt-machinelearningservices', but the Python module is 'azure.mgmt.machinelearningservices'. Common mistake: using 'azure.mgmt.machinelearning'.
fix Use the correct import: 'from azure.mgmt.machinelearningservices import MachineLearningServicesMgmtClient'
deprecated Older versions (pre-1.0.0) may have used models from 'azure.mgmt.machinelearningservices.models' with different names. Ensure you're using the latest stable version.
fix Upgrade to 1.0.0: 'pip install --upgrade azure-mgmt-machinelearningservices'. Check the changelog for model renames.
gotcha Authentication requires azure-identity. Without it, DefaultAzureCredential will fail.
fix Install azure-identity: 'pip install azure-identity'. Ensure environment variables (e.g., AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET) are set.

Create an ML Services management client and list workspaces.

from azure.identity import DefaultAzureCredential
from azure.mgmt.machinelearningservices import MachineLearningServicesMgmtClient

credential = DefaultAzureCredential()
subscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', '')
client = MachineLearningServicesMgmtClient(credential, subscription_id)
workspaces = client.workspaces.list_by_subscription()
for ws in workspaces:
    print(ws.name)