|
| 1 | +$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json |
| 2 | +name: batch_deploy_model |
| 3 | +version: 0.0.6 |
| 4 | +type: command |
| 5 | + |
| 6 | +is_deterministic: True |
| 7 | + |
| 8 | +display_name: Batch deploy model |
| 9 | +description: |
| 10 | + Batch deploy a model to a workspace. The component works on compute with [MSI](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-manage-compute-instance?tabs=python) attached. |
| 11 | + |
| 12 | +environment: azureml://registries/azureml/environments/python-sdk-v2/versions/31 |
| 13 | + |
| 14 | +code: ../../src |
| 15 | +command: >- |
| 16 | + python batch_deploy.py |
| 17 | + $[[--registration_details_folder ${{inputs.registration_details_folder}}]] |
| 18 | + $[[--model_id ${{inputs.model_id}}]] |
| 19 | + $[[--inference_payload_file ${{inputs.inference_payload_file}}]] |
| 20 | + $[[--inference_payload_folder ${{inputs.inference_payload_folder}}]] |
| 21 | + $[[--endpoint_name ${{inputs.endpoint_name}}]] |
| 22 | + $[[--deployment_name ${{inputs.deployment_name}}]] |
| 23 | + $[[--compute_name ${{inputs.compute_name}}]] |
| 24 | + $[[--size ${{inputs.size}}]] |
| 25 | + $[[--min_instances ${{inputs.min_instances}}]] |
| 26 | + $[[--max_instances ${{inputs.max_instances}}]] |
| 27 | + $[[--idle_time_before_scale_down ${{inputs.idle_time_before_scale_down}}]] |
| 28 | + $[[--output_file_name ${{inputs.output_file_name}}]] |
| 29 | + $[[--max_concurrency_per_instance ${{inputs.max_concurrency_per_instance}}]] |
| 30 | + $[[--error_threshold ${{inputs.error_threshold}}]] |
| 31 | + $[[--max_retries ${{inputs.max_retries}}]] |
| 32 | + $[[--timeout ${{inputs.timeout}}]] |
| 33 | + $[[--logging_level ${{inputs.logging_level}}]] |
| 34 | + $[[--mini_batch_size ${{inputs.mini_batch_size}}]] |
| 35 | + $[[--instance_count ${{inputs.instance_count}}]] |
| 36 | + --batch_job_output_folder ${{outputs.batch_job_output_folder}} |
| 37 | +
|
| 38 | +inputs: |
| 39 | + # Output of registering component |
| 40 | + registration_details_folder: |
| 41 | + type: uri_folder |
| 42 | + optional: true |
| 43 | + description: Folder containing model registration details in a JSON file named model_registration_details.json |
| 44 | + |
| 45 | + model_id: |
| 46 | + type: string |
| 47 | + optional: true |
| 48 | + description: | |
| 49 | + Asset ID of the model registered in workspace/registry. |
| 50 | + Registry - azureml://registries/<registry-name>/models/<model-name>/versions/<version> |
| 51 | + Workspace - azureml:<model-name>:<version> |
| 52 | +
|
| 53 | + inference_payload_file: |
| 54 | + type: uri_file |
| 55 | + optional: true |
| 56 | + description: File containing data used to validate deployment |
| 57 | + |
| 58 | + inference_payload_folder: |
| 59 | + type: uri_folder |
| 60 | + optional: true |
| 61 | + description: Folder containing files used to validate deployment |
| 62 | + |
| 63 | + endpoint_name: |
| 64 | + type: string |
| 65 | + optional: true |
| 66 | + description: Name of the endpoint |
| 67 | + |
| 68 | + deployment_name: |
| 69 | + type: string |
| 70 | + optional: true |
| 71 | + default: default |
| 72 | + description: Name of the deployment |
| 73 | + |
| 74 | + compute_name: |
| 75 | + type: string |
| 76 | + optional: true |
| 77 | + default: cpu-cluster |
| 78 | + description: Name of the compute cluster to execute the batch scoring jobs on. New compute will be created if the compute cluster is not present. |
| 79 | + |
| 80 | + size: |
| 81 | + type: string |
| 82 | + optional: true |
| 83 | + enum: |
| 84 | + - Standard_DS1_v2 |
| 85 | + - Standard_DS2_v2 |
| 86 | + - Standard_DS3_v2 |
| 87 | + - Standard_DS4_v2 |
| 88 | + - Standard_DS5_v2 |
| 89 | + - Standard_F2s_v2 |
| 90 | + - Standard_F4s_v2 |
| 91 | + - Standard_F8s_v2 |
| 92 | + - Standard_F16s_v2 |
| 93 | + - Standard_F32s_v2 |
| 94 | + - Standard_F48s_v2 |
| 95 | + - Standard_F64s_v2 |
| 96 | + - Standard_F72s_v2 |
| 97 | + - Standard_FX24mds |
| 98 | + - Standard_FX36mds |
| 99 | + - Standard_FX48mds |
| 100 | + - Standard_E2s_v3 |
| 101 | + - Standard_E4s_v3 |
| 102 | + - Standard_E8s_v3 |
| 103 | + - Standard_E16s_v3 |
| 104 | + - Standard_E32s_v3 |
| 105 | + - Standard_E48s_v3 |
| 106 | + - Standard_E64s_v3 |
| 107 | + - Standard_NC4as_T4_v3 |
| 108 | + - Standard_NC6s_v2 |
| 109 | + - Standard_NC6s_v3 |
| 110 | + - Standard_NC8as_T4_v3 |
| 111 | + - Standard_NC12s_v2 |
| 112 | + - Standard_NC12s_v3 |
| 113 | + - Standard_NC16as_T4_v3 |
| 114 | + - Standard_NC24s_v2 |
| 115 | + - Standard_NC24s_v3 |
| 116 | + - Standard_NC24rs_v3 |
| 117 | + - Standard_NC64as_T4_v3 |
| 118 | + - Standard_ND40rs_v2 |
| 119 | + - Standard_ND96asr_v4 |
| 120 | + - Standard_ND96amsr_A100_v4 |
| 121 | + default: Standard_NC24s_v3 |
| 122 | + description: Compute instance size to deploy model. Make sure that instance type is available and have enough quota available. |
| 123 | + |
| 124 | + min_instances: |
| 125 | + type: integer |
| 126 | + optional: true |
| 127 | + default: 0 |
| 128 | + description: Minimum number of instances of the compute cluster to be created. |
| 129 | + |
| 130 | + max_instances: |
| 131 | + type: integer |
| 132 | + optional: true |
| 133 | + default: 1 |
| 134 | + description: Maximum number of instances of the compute cluster to be created. |
| 135 | + |
| 136 | + idle_time_before_scale_down: |
| 137 | + type: integer |
| 138 | + optional: true |
| 139 | + default: 120 |
| 140 | + description: Node Idle Time before scaling down the compute cluster to be created. |
| 141 | + |
| 142 | + output_file_name: |
| 143 | + type: string |
| 144 | + optional: true |
| 145 | + default: predictions.csv |
| 146 | + description: Name of the batch scoring output file. |
| 147 | + |
| 148 | + max_concurrency_per_instance: |
| 149 | + type: integer |
| 150 | + optional: true |
| 151 | + default: 1 |
| 152 | + description: The maximum number of parallel scoring_script runs per instance. |
| 153 | + |
| 154 | + error_threshold: |
| 155 | + type: integer |
| 156 | + optional: true |
| 157 | + default: -1 |
| 158 | + description: The number of file failures that should be ignored. |
| 159 | + |
| 160 | + max_retries: |
| 161 | + type: integer |
| 162 | + optional: true |
| 163 | + default: 3 |
| 164 | + description: The maximum number of retries for a failed or timed-out mini batch. |
| 165 | + |
| 166 | + timeout: |
| 167 | + type: integer |
| 168 | + optional: true |
| 169 | + default: 500 |
| 170 | + description: The timeout in seconds for scoring a single mini batch. |
| 171 | + |
| 172 | + logging_level: |
| 173 | + type: string |
| 174 | + optional: true |
| 175 | + default: info |
| 176 | + description: The log verbosity level. |
| 177 | + |
| 178 | + mini_batch_size: |
| 179 | + type: integer |
| 180 | + optional: true |
| 181 | + default: 10 |
| 182 | + description: The number of files the code_configuration.scoring_script can process in one run() call. |
| 183 | + |
| 184 | + instance_count: |
| 185 | + type: integer |
| 186 | + optional: true |
| 187 | + default: 1 |
| 188 | + description: The number of nodes to use for each batch scoring job. |
| 189 | + |
| 190 | +outputs: |
| 191 | + batch_job_output_folder: |
| 192 | + type: uri_folder |
| 193 | + description: Folder to which batch job outputs will be saved. |
| 194 | + |
| 195 | +tags: |
| 196 | + Preview: "" |
| 197 | + Internal: "" |
0 commit comments