BatchDeployment Class
Batch endpoint deployment entity.
- Inheritance
-
azure.ai.ml.entities._deployment.deployment.DeploymentBatchDeployment
Constructor
BatchDeployment(*, name: str, endpoint_name: str | None = None, description: str | None = None, tags: Dict[str, Any] | None = None, properties: Dict[str, str] | None = None, model: str | Model | None = None, code_configuration: CodeConfiguration | None = None, environment: str | Environment | None = None, compute: str | None = None, resources: ResourceConfiguration | None = None, output_file_name: str | None = None, output_action: BatchDeploymentOutputAction | str | None = None, error_threshold: int | None = None, retry_settings: BatchRetrySettings | None = None, logging_level: str | None = None, mini_batch_size: int | None = None, max_concurrency_per_instance: int | None = None, environment_variables: Dict[str, str] | None = None, code_path: PathLike | str | None = None, scoring_script: PathLike | str | None = None, instance_count: int | None = None, **kwargs: Any)
Parameters
Name | Description |
---|---|
name
Required
|
the name of the batch deployment |
description
Required
|
Description of the resource. |
tags
Required
|
Tag dictionary. Tags can be added, removed, and updated. |
properties
Required
|
The asset property dictionary. |
model
Required
|
Model entity for the endpoint deployment, defaults to None |
code_configuration
Required
|
defaults to None |
environment
Required
|
Environment entity for the endpoint deployment., defaults to None |
compute
Required
|
Compute target for batch inference operation. |
output_action
Required
|
Indicates how the output will be organized. Possible values include: "summary_only", "append_row". Defaults to "append_row" |
output_file_name
Required
|
Customized output file name for append_row output action, defaults to "predictions.csv" |
max_concurrency_per_instance
Required
|
Indicates maximum number of parallelism per instance, defaults to 1 |
error_threshold
Required
|
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] -1 value indicates, ignore all failures during batch inference For FileDataset count of file failures For TabularDataset, this is the count of record failures, defaults to -1 |
retry_settings
Required
|
Retry settings for a batch inference operation, defaults to None |
resources
Required
|
Indicates compute configuration for the job. |
logging_level
Required
|
Logging level for batch inference operation, defaults to "info" |
mini_batch_size
Required
|
Size of the mini-batch passed to each batch invocation, defaults to 10 |
environment_variables
Required
|
Environment variables that will be set in deployment. |
code_path
Required
|
Folder path to local code assets. Equivalent to code_configuration.code. |
scoring_script
Required
|
Scoring script name. Equivalent to code_configuration.code.scoring_script. |
instance_count
Required
|
Number of instances the interfering will run on. Equivalent to resources.instance_count. |
Keyword-Only Parameters
Name | Description |
---|---|
name
Required
|
|
endpoint_name
Required
|
|
description
Required
|
|
tags
Required
|
|
properties
Required
|
|
model
Required
|
|
code_configuration
Required
|
|
environment
Required
|
|
compute
Required
|
|
resources
Required
|
|
output_file_name
Required
|
|
output_action
Required
|
|
error_threshold
Required
|
|
retry_settings
Required
|
|
logging_level
Required
|
|
mini_batch_size
Required
|
|
max_concurrency_per_instance
Required
|
|
environment_variables
Required
|
|
code_path
Required
|
|
scoring_script
Required
|
|
instance_count
Required
|
|
Methods
dump |
Dump the deployment content into a file in yaml format. |
dump
Dump the deployment content into a file in yaml format.
dump(dest: str | PathLike | IO, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
dest
Required
|
The destination to receive this deployment's content. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable. |
Attributes
base_path
code_path
The code directory containing the scoring script.
Returns
Type | Description |
---|---|
creation_context
The creation context of the resource.
Returns
Type | Description |
---|---|
The creation metadata for the resource. |
id
The resource ID.
Returns
Type | Description |
---|---|
The global ID of the resource, an Azure Resource Manager (ARM) ID. |
instance_count
provisioning_state
Batch deployment provisioning state, readonly.
Returns
Type | Description |
---|---|
Batch deployment provisioning state. |
scoring_script
The scoring script file path relative to the code directory.
Returns
Type | Description |
---|---|
type
Azure SDK for Python