You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -80,7 +80,184 @@ To successfully invoke a batch endpoint and create jobs, ensure you have the fol
80
80
> [!TIP]
81
81
> If you are using a credential-less data store or external Azure Storage Account as data input, ensure you [configure compute clusters for data access](how-to-authenticate-batch-endpoint.md#configure-compute-clusters-for-data-access). **The managed identity of the compute cluster** is used **for mounting** the storage account. The identity of the job (invoker) is still used to read the underlying data allowing you to achieve granular access control.
82
82
83
+
## Create jobs basics
83
84
85
+
To create a job from a batch endpoint you have to invoke it. Invocation can be done using the Azure CLI, the Azure Machine Learning SDK for Python, or a REST API call. The following examples show the basics of invocation for a batch endpoint that receives a single input data folder for processing. See [Understanding inputs and outputs](how-to-access-data-batch-endpoints-jobs.md#understanding-inputs-and-outputs) for examples with different inputs and outputs.
86
+
87
+
# [Azure CLI](#tab/cli)
88
+
89
+
Use the `invoke` operation under batch endpoints:
90
+
91
+
```azurecli
92
+
az ml batch-endpoint invoke --name $ENDPOINT_NAME \
Make a `POST` request to the invocation URL of the endpoint. You can get the invocation URL from Azure Machine Learning portal, in the endpoint's details page.
Batch endpoints can host multiple deployments under the same endpoint. The default endpoint is used unless the user specifies otherwise. You can change the deployment that is used as follows:
141
+
142
+
# [Azure CLI](#tab/cli)
143
+
144
+
Use the argument `--deployment-name` or `-d` to specify the name of the deployment:
145
+
146
+
```azurecli
147
+
az ml batch-endpoint invoke --name $ENDPOINT_NAME \
@@ -782,111 +959,6 @@ The following example shows how to change the location where an output named `sc
782
959
Content-Type: application/json
783
960
```
784
961
785
-
## Invoke a specific deployment
786
-
787
-
Batch endpoints can host multiple deployments under the same endpoint. The default endpoint is used unless the user specifies otherwise. You can change the deployment that is used as follows:
788
-
789
-
# [Azure CLI](#tab/cli)
790
-
791
-
Use the argument `--deployment-name` or `-d` to specify the name of the deployment:
792
-
793
-
```azurecli
794
-
az ml batch-endpoint invoke --name $ENDPOINT_NAME --deployment-name $DEPLOYMENT_NAME --input $INPUT_DATA
795
-
```
796
-
797
-
# [Python](#tab/sdk)
798
-
799
-
Use the parameter `deployment_name` to specify the name of the deployment:
800
-
801
-
```python
802
-
job = ml_client.batch_endpoints.invoke(
803
-
endpoint_name=endpoint.name,
804
-
deployment_name=deployment.name,
805
-
inputs={
806
-
"heart_dataset": input,
807
-
}
808
-
)
809
-
```
810
-
811
-
# [REST](#tab/rest)
812
-
813
-
Add the header `azureml-model-deployment` to your request, including the name of the deployment you want to invoke.
814
-
815
-
__Request__
816
-
817
-
```http
818
-
POST jobs HTTP/1.1
819
-
Host: <ENDPOINT_URI>
820
-
Authorization: Bearer <TOKEN>
821
-
Content-Type: application/json
822
-
azureml-model-deployment: DEPLOYMENT_NAME
823
-
```
824
-
---
825
-
826
-
## Configure job properties
827
-
828
-
You can configure some of the properties in the created job at invocation time.
829
-
830
-
> [!NOTE]
831
-
> Configuring job properties is only available in batch endpoints with Pipeline component deployments by the moment.
832
-
833
-
### Configure experiment name
834
-
835
-
# [Azure CLI](#tab/cli)
836
-
837
-
Use the argument `--experiment-name` to specify the name of the experiment:
838
-
839
-
```azurecli
840
-
az ml batch-endpoint invoke --name $ENDPOINT_NAME --experiment-name "my-batch-job-experiment" --input $INPUT_DATA
841
-
```
842
-
843
-
# [Python](#tab/sdk)
844
-
845
-
Use the parameter `experiment_name` to specify the name of the experiment:
846
-
847
-
```python
848
-
job = ml_client.batch_endpoints.invoke(
849
-
endpoint_name=endpoint.name,
850
-
experiment_name="my-batch-job-experiment",
851
-
inputs={
852
-
"heart_dataset": input,
853
-
}
854
-
)
855
-
```
856
-
857
-
# [REST](#tab/rest)
858
-
859
-
Use the key `experimentName` in `properties` section to indicate the experiment name:
0 commit comments