Batch Deployments - Update

Update a batch inference deployment (asynchronous).

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}?api-version=2024-04-01

URI Parameters

Name In Required Type Description
deploymentName
path True

string

The identifier for the Batch inference deployment.

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$

endpointName
path True

string

Inference endpoint name

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

The ID of the target subscription.

workspaceName
path True

string

Name of Azure Machine Learning workspace.

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
properties

PartialBatchDeployment

Additional attributes of the entity.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

BatchDeploymentTrackedResource

Success

202 Accepted

Accepted

Headers

  • x-ms-async-operation-timeout: string
  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

Error

Examples

Update Workspace Batch Deployment.

Sample Request

PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/my-aml-workspace/batchEndpoints/testEndpointName/deployments/testDeploymentName?api-version=2024-04-01

{
  "properties": {
    "description": "string"
  },
  "tags": {}
}

Sample Response

Location: example_location
{
  "id": "string",
  "name": "string",
  "type": "string",
  "properties": {
    "description": "string",
    "properties": {
      "string": "string"
    },
    "codeConfiguration": {
      "codeId": "string",
      "scoringScript": "string"
    },
    "environmentId": "string",
    "environmentVariables": {
      "string": "string"
    },
    "compute": "string",
    "errorThreshold": 1,
    "retrySettings": {
      "maxRetries": 1,
      "timeout": "PT5M"
    },
    "miniBatchSize": 1,
    "loggingLevel": "Info",
    "model": {
      "referenceType": "Id",
      "assetId": "string"
    },
    "maxConcurrencyPerInstance": 1,
    "outputAction": "SummaryOnly",
    "outputFileName": "string",
    "resources": {
      "instanceCount": 1,
      "instanceType": "string",
      "properties": {
        "string": {
          "1e5e1cf9-b0ea-4cf6-9764-e750bf85c10a": null
        }
      }
    },
    "provisioningState": "Creating"
  },
  "systemData": {
    "createdAt": "2020-01-01T12:34:56.999Z",
    "createdBy": "string",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-01T12:34:56.999Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  },
  "tags": {},
  "location": "string",
  "kind": "string",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-1111-2222-3333-444444444444",
    "tenantId": "00000000-1111-2222-3333-444444444444",
    "userAssignedIdentities": {
      "string": {
        "principalId": "00000000-1111-2222-3333-444444444444",
        "clientId": "00000000-1111-2222-3333-444444444444"
      }
    }
  },
  "sku": {
    "name": "string",
    "tier": "Free",
    "size": "string",
    "family": "string",
    "capacity": 1
  }
}
Location: example_location

Definitions

Name Description
BatchDeployment

Batch inference settings per deployment.

BatchDeploymentConfigurationType

The enumerated property types for batch deployments.

BatchDeploymentTrackedResource
BatchLoggingLevel

Log verbosity for batch inferencing. Increasing verbosity order for logging is : Warning, Info and Debug. The default value is Info.

BatchOutputAction

Enum to determine how batch inferencing will handle output

BatchPipelineComponentDeploymentConfiguration

Properties for a Batch Pipeline Component Deployment.

BatchRetrySettings

Retry settings for a batch inference operation.

CodeConfiguration

Configuration for a scoring code asset.

createdByType

The type of identity that created the resource.

DataPathAssetReference

Reference to an asset via its path in a datastore.

DeploymentProvisioningState

Possible values for DeploymentProvisioningState.

DeploymentResourceConfiguration
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

IdAssetReference

Reference to an asset via its ARM resource ID.

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

OutputPathAssetReference

Reference to an asset via its path in a job output.

PartialBatchDeployment

Mutable batch inference settings per deployment.

PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties

Strictly used in update requests.

ReferenceType

Enum to determine which reference method to use for an asset.

Sku

The resource model definition representing SKU

SkuTier

This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

systemData

Metadata pertaining to creation and last modification of the resource.

UserAssignedIdentity

User assigned identity properties

BatchDeployment

Batch inference settings per deployment.

Name Type Default Value Description
codeConfiguration

CodeConfiguration

Code configuration for the endpoint deployment.

compute

string

Compute target for batch inference operation.

deploymentConfiguration BatchDeploymentConfiguration:

BatchPipelineComponentDeploymentConfiguration

Properties relevant to different deployment types.

description

string

Description of the endpoint deployment.

environmentId

string

ARM resource ID or AssetId of the environment specification for the endpoint deployment.

environmentVariables

object

Environment variables configuration for the deployment.

errorThreshold

integer

-1

Error threshold, if the error count for the entire input goes above this value, the batch inference will be aborted. Range is [-1, int.MaxValue]. For FileDataset, this value is the count of file failures. For TabularDataset, this value is the count of record failures. If set to -1 (the lower bound), all failures during batch inference will be ignored.

loggingLevel

BatchLoggingLevel

Info

Logging level for batch inference operation.

maxConcurrencyPerInstance

integer

1

Indicates maximum number of parallelism per instance.

miniBatchSize

integer

10

Size of the mini-batch passed to each batch invocation. For FileDataset, this is the number of files per mini-batch. For TabularDataset, this is the size of the records in bytes, per mini-batch.

model AssetReferenceBase:

Reference to the model asset for the endpoint deployment.

outputAction

BatchOutputAction

AppendRow

Indicates how the output will be organized.

outputFileName

string

predictions.csv

Customized output file name for append_row output action.

properties

object

Property dictionary. Properties can be added, but not removed or altered.

provisioningState

DeploymentProvisioningState

Provisioning state for the endpoint deployment.

resources

DeploymentResourceConfiguration

Indicates compute configuration for the job. If not provided, will default to the defaults defined in ResourceConfiguration.

retrySettings

BatchRetrySettings

Retry Settings for the batch inference operation. If not provided, will default to the defaults defined in BatchRetrySettings.

BatchDeploymentConfigurationType

The enumerated property types for batch deployments.

Name Type Description
Model

string

PipelineComponent

string

BatchDeploymentTrackedResource

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

kind

string

Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type.

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties

BatchDeployment

[Required] Additional attributes of the entity.

sku

Sku

Sku details required for ARM contract for Autoscaling.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

BatchLoggingLevel

Log verbosity for batch inferencing. Increasing verbosity order for logging is : Warning, Info and Debug. The default value is Info.

Name Type Description
Debug

string

Info

string

Warning

string

BatchOutputAction

Enum to determine how batch inferencing will handle output

Name Type Description
AppendRow

string

SummaryOnly

string

BatchPipelineComponentDeploymentConfiguration

Properties for a Batch Pipeline Component Deployment.

Name Type Description
componentId

IdAssetReference

The ARM id of the component to be run.

deploymentConfigurationType string:

PipelineComponent

[Required] The type of the deployment

description

string

The description which will be applied to the job.

settings

object

Run-time settings for the pipeline job.

tags

object

The tags which will be applied to the job.

BatchRetrySettings

Retry settings for a batch inference operation.

Name Type Default Value Description
maxRetries

integer

3

Maximum retry count for a mini-batch

timeout

string

PT30S

Invocation timeout for a mini-batch, in ISO 8601 format.

CodeConfiguration

Configuration for a scoring code asset.

Name Type Description
codeId

string

ARM resource ID of the code asset.

scoringScript

string

[Required] The script to execute on startup. eg. "score.py"

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DataPathAssetReference

Reference to an asset via its path in a datastore.

Name Type Description
datastoreId

string

ARM resource ID of the datastore where the asset is located.

path

string

The path of the file/directory in the datastore.

referenceType string:

DataPath

[Required] Specifies the type of asset reference.

DeploymentProvisioningState

Possible values for DeploymentProvisioningState.

Name Type Description
Canceled

string

Creating

string

Deleting

string

Failed

string

Scaling

string

Succeeded

string

Updating

string

DeploymentResourceConfiguration

Name Type Default Value Description
instanceCount

integer

1

Optional number of instances or nodes used by the compute target.

instanceType

string

Optional type of VM used as supported by the compute target.

properties

object

Additional properties bag.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

IdAssetReference

Reference to an asset via its ARM resource ID.

Name Type Description
assetId

string

[Required] ARM resource ID of the asset.

referenceType string:

Id

[Required] Specifies the type of asset reference.

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

Name Type Description
principalId

string

The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId

string

The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.

type

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned Identities
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

Name Type Description
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

OutputPathAssetReference

Reference to an asset via its path in a job output.

Name Type Description
jobId

string

ARM resource ID of the job.

path

string

The path of the file/directory in the job output.

referenceType string:

OutputPath

[Required] Specifies the type of asset reference.

PartialBatchDeployment

Mutable batch inference settings per deployment.

Name Type Description
description

string

Description of the endpoint deployment.

PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties

Strictly used in update requests.

Name Type Description
properties

PartialBatchDeployment

Additional attributes of the entity.

tags

object

Resource tags.

ReferenceType

Enum to determine which reference method to use for an asset.

Name Type Description
DataPath

string

Id

string

OutputPath

string

Sku

The resource model definition representing SKU

Name Type Description
capacity

integer

If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.

family

string

If the service has different generations of hardware, for the same SKU, then that can be captured here.

name

string

The name of the SKU. Ex - P3. It is typically a letter+number code

size

string

The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.

tier

SkuTier

This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

SkuTier

This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

Name Type Description
Basic

string

Free

string

Premium

string

Standard

string

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

UserAssignedIdentity

User assigned identity properties

Name Type Description
clientId

string

The client ID of the assigned identity.

principalId

string

The principal ID of the assigned identity.