Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions azure-mgmt-batchai/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@
Release History
===============

2.0.0 (2018-06-07)
++++++++++++++++++

**Breaking changes**

This version uses 2018-05-01 BatchAI API specification which introduced the following braking changes:

- Clusters, FileServers must be created under a workspace;
- Jobs must be created under an experiment;
- Clusters, FileServers and Jobs do not accept location during creation and belong to the same location as the parent
workspace;
- Clusters, FileServers and Jobs do not support tags;
- BatchAIManagementClient.usage renamed to BatchAIManagementClient.usages;
- Job priority changed a type from int to an enum;
- File.is_directory is replaced with File.file_type;
- Job.priority and JobCreateParameters.priority is replaced with scheduling_priority;
- Removed unsupported MountSettings.file_server_type attribute;
- OutputDirectory.type unsupported attribute removed;
- OutputDirectory.create_new attributes removed, BatchAI will always create output directories if they not exist;
- SetupTask.run_elevated attribute removed, the setup task is always executed under root.

**Features**

- Added support to workspaces to group Clusters, FileServers and Experiments and remove limit on number of allocated
resources;
- Added support for experiment to group jobs and remove limit on number of jobs;
- Added support for configuring /dev/shm for jobs which use docker containers;
- Added first class support for generic MPI jobs;
- Added first class support for Horovod jobs.

1.0.1 (2018-04-16)
++++++++++++++++++

Expand Down
34 changes: 22 additions & 12 deletions azure-mgmt-batchai/azure/mgmt/batchai/batch_ai_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.operations import Operations
from .operations.usage_operations import UsageOperations
from .operations.clusters_operations import ClustersOperations
from .operations.usages_operations import UsagesOperations
from .operations.workspaces_operations import WorkspacesOperations
from .operations.experiments_operations import ExperimentsOperations
from .operations.jobs_operations import JobsOperations
from .operations.file_servers_operations import FileServersOperations
from .operations.clusters_operations import ClustersOperations
from . import models


Expand Down Expand Up @@ -53,22 +55,26 @@ def __init__(
self.subscription_id = subscription_id


class BatchAIManagementClient(object):
class BatchAIManagementClient(SDKClient):
"""The Azure BatchAI Management API.

:ivar config: Configuration for client.
:vartype config: BatchAIManagementClientConfiguration

:ivar operations: Operations operations
:vartype operations: azure.mgmt.batchai.operations.Operations
:ivar usage: Usage operations
:vartype usage: azure.mgmt.batchai.operations.UsageOperations
:ivar clusters: Clusters operations
:vartype clusters: azure.mgmt.batchai.operations.ClustersOperations
:ivar usages: Usages operations
:vartype usages: azure.mgmt.batchai.operations.UsagesOperations
:ivar workspaces: Workspaces operations
:vartype workspaces: azure.mgmt.batchai.operations.WorkspacesOperations
:ivar experiments: Experiments operations
:vartype experiments: azure.mgmt.batchai.operations.ExperimentsOperations
:ivar jobs: Jobs operations
:vartype jobs: azure.mgmt.batchai.operations.JobsOperations
:ivar file_servers: FileServers operations
:vartype file_servers: azure.mgmt.batchai.operations.FileServersOperations
:ivar clusters: Clusters operations
:vartype clusters: azure.mgmt.batchai.operations.ClustersOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -82,20 +88,24 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = BatchAIManagementClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(BatchAIManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-03-01'
self.api_version = '2018-05-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.usage = UsageOperations(
self.usages = UsagesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(
self.workspaces = WorkspacesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.experiments = ExperimentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.jobs = JobsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.file_servers = FileServersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(
self._client, self.config, self._serialize, self._deserialize)
85 changes: 53 additions & 32 deletions azure-mgmt-batchai/azure/mgmt/batchai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from .mount_settings_py3 import MountSettings
from .file_server_py3 import FileServer
from .key_vault_secret_reference_py3 import KeyVaultSecretReference
from .key_vault_key_reference_py3 import KeyVaultKeyReference
from .file_server_create_parameters_py3 import FileServerCreateParameters
from .manual_scale_settings_py3 import ManualScaleSettings
from .auto_scale_settings_py3 import AutoScaleSettings
Expand Down Expand Up @@ -54,6 +53,8 @@
from .caffe2_settings_py3 import Caffe2Settings
from .chainer_settings_py3 import ChainerSettings
from .custom_toolkit_settings_py3 import CustomToolkitSettings
from .custom_mpi_settings_py3 import CustomMpiSettings
from .horovod_settings_py3 import HorovodSettings
from .job_preparation_py3 import JobPreparation
from .input_directory_py3 import InputDirectory
from .output_directory_py3 import OutputDirectory
Expand All @@ -65,16 +66,20 @@
from .remote_login_information_py3 import RemoteLoginInformation
from .file_py3 import File
from .resource_py3 import Resource
from .local_data_volume_py3 import LocalDataVolume
from .proxy_resource_py3 import ProxyResource
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .clusters_list_options_py3 import ClustersListOptions
from .clusters_list_by_resource_group_options_py3 import ClustersListByResourceGroupOptions
from .jobs_list_options_py3 import JobsListOptions
from .jobs_list_by_resource_group_options_py3 import JobsListByResourceGroupOptions
from .workspace_py3 import Workspace
from .workspace_create_parameters_py3 import WorkspaceCreateParameters
from .workspace_update_parameters_py3 import WorkspaceUpdateParameters
from .experiment_py3 import Experiment
from .workspaces_list_options_py3 import WorkspacesListOptions
from .workspaces_list_by_resource_group_options_py3 import WorkspacesListByResourceGroupOptions
from .experiments_list_by_workspace_options_py3 import ExperimentsListByWorkspaceOptions
from .jobs_list_by_experiment_options_py3 import JobsListByExperimentOptions
from .jobs_list_output_files_options_py3 import JobsListOutputFilesOptions
from .file_servers_list_options_py3 import FileServersListOptions
from .file_servers_list_by_resource_group_options_py3 import FileServersListByResourceGroupOptions
from .file_servers_list_by_workspace_options_py3 import FileServersListByWorkspaceOptions
from .clusters_list_by_workspace_options_py3 import ClustersListByWorkspaceOptions
except (SyntaxError, ImportError):
from .usage_name import UsageName
from .usage import Usage
Expand All @@ -85,7 +90,6 @@
from .mount_settings import MountSettings
from .file_server import FileServer
from .key_vault_secret_reference import KeyVaultSecretReference
from .key_vault_key_reference import KeyVaultKeyReference
from .file_server_create_parameters import FileServerCreateParameters
from .manual_scale_settings import ManualScaleSettings
from .auto_scale_settings import AutoScaleSettings
Expand Down Expand Up @@ -120,6 +124,8 @@
from .caffe2_settings import Caffe2Settings
from .chainer_settings import ChainerSettings
from .custom_toolkit_settings import CustomToolkitSettings
from .custom_mpi_settings import CustomMpiSettings
from .horovod_settings import HorovodSettings
from .job_preparation import JobPreparation
from .input_directory import InputDirectory
from .output_directory import OutputDirectory
Expand All @@ -131,35 +137,42 @@
from .remote_login_information import RemoteLoginInformation
from .file import File
from .resource import Resource
from .local_data_volume import LocalDataVolume
from .proxy_resource import ProxyResource
from .operation_display import OperationDisplay
from .operation import Operation
from .clusters_list_options import ClustersListOptions
from .clusters_list_by_resource_group_options import ClustersListByResourceGroupOptions
from .jobs_list_options import JobsListOptions
from .jobs_list_by_resource_group_options import JobsListByResourceGroupOptions
from .workspace import Workspace
from .workspace_create_parameters import WorkspaceCreateParameters
from .workspace_update_parameters import WorkspaceUpdateParameters
from .experiment import Experiment
from .workspaces_list_options import WorkspacesListOptions
from .workspaces_list_by_resource_group_options import WorkspacesListByResourceGroupOptions
from .experiments_list_by_workspace_options import ExperimentsListByWorkspaceOptions
from .jobs_list_by_experiment_options import JobsListByExperimentOptions
from .jobs_list_output_files_options import JobsListOutputFilesOptions
from .file_servers_list_options import FileServersListOptions
from .file_servers_list_by_resource_group_options import FileServersListByResourceGroupOptions
from .file_servers_list_by_workspace_options import FileServersListByWorkspaceOptions
from .clusters_list_by_workspace_options import ClustersListByWorkspaceOptions
from .operation_paged import OperationPaged
from .usage_paged import UsagePaged
from .remote_login_information_paged import RemoteLoginInformationPaged
from .cluster_paged import ClusterPaged
from .workspace_paged import WorkspacePaged
from .experiment_paged import ExperimentPaged
from .job_paged import JobPaged
from .file_paged import FilePaged
from .remote_login_information_paged import RemoteLoginInformationPaged
from .file_server_paged import FileServerPaged
from .cluster_paged import ClusterPaged
from .batch_ai_management_client_enums import (
UsageUnit,
CachingType,
StorageAccountType,
FileServerType,
FileServerProvisioningState,
VmPriority,
DeallocationOption,
ProvisioningState,
AllocationState,
OutputType,
JobPriority,
ToolType,
ExecutionState,
FileType,
)

__all__ = [
Expand All @@ -172,7 +185,6 @@
'MountSettings',
'FileServer',
'KeyVaultSecretReference',
'KeyVaultKeyReference',
'FileServerCreateParameters',
'ManualScaleSettings',
'AutoScaleSettings',
Expand Down Expand Up @@ -207,6 +219,8 @@
'Caffe2Settings',
'ChainerSettings',
'CustomToolkitSettings',
'CustomMpiSettings',
'HorovodSettings',
'JobPreparation',
'InputDirectory',
'OutputDirectory',
Expand All @@ -218,32 +232,39 @@
'RemoteLoginInformation',
'File',
'Resource',
'LocalDataVolume',
'ProxyResource',
'OperationDisplay',
'Operation',
'ClustersListOptions',
'ClustersListByResourceGroupOptions',
'JobsListOptions',
'JobsListByResourceGroupOptions',
'Workspace',
'WorkspaceCreateParameters',
'WorkspaceUpdateParameters',
'Experiment',
'WorkspacesListOptions',
'WorkspacesListByResourceGroupOptions',
'ExperimentsListByWorkspaceOptions',
'JobsListByExperimentOptions',
'JobsListOutputFilesOptions',
'FileServersListOptions',
'FileServersListByResourceGroupOptions',
'FileServersListByWorkspaceOptions',
'ClustersListByWorkspaceOptions',
'OperationPaged',
'UsagePaged',
'RemoteLoginInformationPaged',
'ClusterPaged',
'WorkspacePaged',
'ExperimentPaged',
'JobPaged',
'FilePaged',
'RemoteLoginInformationPaged',
'FileServerPaged',
'ClusterPaged',
'UsageUnit',
'CachingType',
'StorageAccountType',
'FileServerType',
'FileServerProvisioningState',
'VmPriority',
'DeallocationOption',
'ProvisioningState',
'AllocationState',
'OutputType',
'JobPriority',
'ToolType',
'ExecutionState',
'FileType',
]
29 changes: 19 additions & 10 deletions azure-mgmt-batchai/azure/mgmt/batchai/models/batch_ai_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,25 @@
class BatchAIError(Model):
"""An error response from the Batch AI service.

:param code: An identifier for the error. Codes are invariant and are
Variables are only populated by the server, and will be ignored when
sending a request.

:ivar code: An identifier for the error. Codes are invariant and are
intended to be consumed programmatically.
:type code: str
:param message: A message describing the error, intended to be suitable
for display in a user interface.
:type message: str
:param details: A list of additional details about the error.
:type details: list[~azure.mgmt.batchai.models.NameValuePair]
:vartype code: str
:ivar message: A message describing the error, intended to be suitable for
display in a user interface.
:vartype message: str
:ivar details: A list of additional details about the error.
:vartype details: list[~azure.mgmt.batchai.models.NameValuePair]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'details': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
Expand All @@ -33,6 +42,6 @@ class BatchAIError(Model):

def __init__(self, **kwargs):
super(BatchAIError, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.details = kwargs.get('details', None)
self.code = None
self.message = None
self.details = None
31 changes: 20 additions & 11 deletions azure-mgmt-batchai/azure/mgmt/batchai/models/batch_ai_error_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,33 @@
class BatchAIError(Model):
"""An error response from the Batch AI service.

:param code: An identifier for the error. Codes are invariant and are
Variables are only populated by the server, and will be ignored when
sending a request.

:ivar code: An identifier for the error. Codes are invariant and are
intended to be consumed programmatically.
:type code: str
:param message: A message describing the error, intended to be suitable
for display in a user interface.
:type message: str
:param details: A list of additional details about the error.
:type details: list[~azure.mgmt.batchai.models.NameValuePair]
:vartype code: str
:ivar message: A message describing the error, intended to be suitable for
display in a user interface.
:vartype message: str
:ivar details: A list of additional details about the error.
:vartype details: list[~azure.mgmt.batchai.models.NameValuePair]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'details': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'details': {'key': 'details', 'type': '[NameValuePair]'},
}

def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None:
def __init__(self, **kwargs) -> None:
super(BatchAIError, self).__init__(**kwargs)
self.code = code
self.message = message
self.details = details
self.code = None
self.message = None
self.details = None
Loading