Registry / azure / azure-mgmt-batchai

azure-mgmt-batchai

JSON →
library7.0.0pypypiunverified

The `azure-mgmt-batchai` Python client library provides functionality to manage Azure Batch AI resources. However, the Azure Batch AI service itself was retired on March 31, 2019. The `azure-mgmt-batchai` package is deprecated and received only security fixes until October 31, 2024. Users are strongly advised to migrate to the Azure Machine Learning service and its corresponding SDK, `azureml-core`, for at-scale training and machine learning capabilities. This library is not actively maintained for new features or non-security bug fixes.

azureai-ml
pip install azure-mgmt-batchai
Install & Compatibility
Where this runs
tested against v7.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
8/12 runs
8/12 runs
py 3.11
8/12 runs
8/12 runs
py 3.12
8/12 runs
8/12 runs
py 3.13
8/12 runs
8/12 runs
py 3.9
8/12 runs
8/12 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BatchAIManagementClient
from azure.mgmt.batchai import BatchAIManagementClient
from azure.mgmt.batchai import BatchAIManagementClient

This quickstart demonstrates how to instantiate the `BatchAIManagementClient`. Due to the service's retirement and the SDK's deprecation, actual resource management operations will fail. It uses `DefaultAzureCredential` for authentication, which attempts to authenticate through various methods (environment variables, managed identity, etc.). Set the `AZURE_SUBSCRIPTION_ID` environment variable before running.

import os from azure.identity import DefaultAzureCredential from azure.mgmt.batchai import BatchAIManagementClient # WARNING: The Azure Batch AI service has been retired as of March 31, 2019. # This SDK package is deprecated and is no longer maintained for new features. # New subscriptions cannot create Batch AI resources. This code is for illustration only. # Users should migrate to Azure Machine Learning service (azureml-core). subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "") # Your Azure Subscription ID if not subscription_id: raise ValueError("AZURE_SUBSCRIPTION_ID environment variable not set.") # Authenticate with Azure (using recommended DefaultAzureCredential) credential = DefaultAzureCredential() # Create a Batch AI Management client client = BatchAIManagementClient(credential, subscription_id) print("Azure Batch AI Management Client instantiated.") print("Note: The Azure Batch AI service has been retired and this SDK is deprecated.") print("Attempting operations will likely result in service-level errors.") print("Consider migrating to the Azure Machine Learning service.")
Debug
Known issues
breakingThe underlying Azure Batch AI service has been retired as of March 31, 2019. New subscriptions cannot register for or create Batch AI resources. Existing deployments were subject to a grace period, but the service is no longer supported.
fix
Migrate your workloads to the Azure Machine Learning service (using the `azureml-core` SDK) or other appropriate Azure compute services.
affects: All versions
deprecatedThe `azure-mgmt-batchai` package is deprecated and will no longer be maintained for new features or non-security bug fixes after October 31, 2024. Only security fixes were provided until that date.
fix
Avoid using this package for new development. Migrate existing applications to `azureml-core` for machine learning workloads.
affects: 7.0.0 and earlier
breakingVersion 7.x introduced a complete revamp of the credential system. Old authentication methods (e.g., `azure.common.credentials`, `msrestazure.azure_active_directory`) are no longer supported.
fix
Use classes from the `azure-identity` package, such as `DefaultAzureCredential`, for authentication. The `credentials` parameter was also renamed to `credential`.
affects: 7.0.0 and later (from 7.0.0b1 onwards)
breakingSignificant API specification changes in versions 2.0.0 and 7.x. For example, `Clusters` and `FileServers` must be created under a `Workspace`, `Jobs` under an `Experiment`. Resources no longer accept `location` or `tags` during creation. Method names like `BatchAIManagementClient.usage` were renamed to `BatchAIManagementClient.usages`.
fix
Refer to the specific version's changelog and documentation for the updated resource hierarchy and method signatures. However, given the service retirement, migration to Azure Machine Learning is the primary recommendation.
affects: 2.0.0 and later, 7.0.0 and later
gotchaLong-Running Operations (LROs) in version 7.x now return `azure.core.polling.LROPoller` and are typically prefixed with `begin_` (e.g., `begin_create`). This replaces `msrest.polling.LROPoller` from earlier versions.
fix
Update calls to LRO methods to use the `begin_` prefix and handle the `azure.core.polling.LROPoller` object.
affects: 7.0.0 and later (from 7.0.0b1 onwards)
breakingThe `azure-mgmt-batchai` package, specifically version 7.0.0, has a declared dependency on `msrest`. However, in this test environment, `pip` failed to install `msrest` automatically, leading to a `ModuleNotFoundError` when attempting to import the client. This issue prevents the library from being used at all.
fix
Explicitly install `msrest` alongside `azure-mgmt-batchai` (e.g., `pip install azure-mgmt-batchai msrest`). Alternatively, as the Azure Batch AI service is retired, consider migrating to Azure Machine Learning (using `azureml-core`) or other appropriate Azure compute services, as recommended in other warnings.
affects: 7.0.0
breakingThe `azure-mgmt-batchai` package (version 7.0.0) has an undeclared dependency on `msrest`. Its internal client code attempts to import `msrest.Deserializer` and `msrest.Serializer`, but `msrest` is not installed by default, leading to a `ModuleNotFoundError`.
fix
To resolve the `ModuleNotFoundError`, explicitly install `msrest` alongside `azure-mgmt-batchai` (e.g., `pip install azure-mgmt-batchai msrest`). However, given the package's deprecated status and underlying service retirement, migration to Azure Machine Learning service (using `azureml-core` SDK) or other appropriate Azure compute services is strongly recommended.
affects: 7.0.0
Upgrade
Version history
7.0.0latest on PyPI
Audit
Dependencies
azure-identityrequiredRequired for modern Azure SDK authentication, replacing older credential methods in version 7.x.
azure-corerequiredCore utilities for Azure SDK clients, implicitly used by management clients.
Agent activity
78 hits · last 30 days
amazonbot
4
mj12bot
3
seranking-bot
3
node
2
ahrefsbot
2
Amazon
1
bingbot
1
Resources