Can not set instance count when using Batch Endpoint. (From job)

Hongbo Jiao (CSI Interfusion Inc) 0 Reputation points Microsoft External Staff
2025-06-05T09:47:22.7133333+00:00

Describe your suggestion

https://learn.microsoft.com/en-us/azure/machine-learning/how-to-use-batch-pipeline-from-job?view=azureml-api-2&tabs=cli

I have a Pipeline job with 2 steps. The first step is configured with 2 instance counts. However, when I publish this job to Batch Endpoint, the instance count becomes 1, and there is no other way to set the instance count when calling batch endpoint.

When published to Batch Endpoint, the instance_count and process_count_per_node not works, but the run_invocation_timeout in environment variables is works.

"Jobs": { "flow_step": { "type": "parallel", "resources": { "instance_count": 2 }, "error_threshold": -1, "environment_variables": { "AZUREML_PARAMETER_aml_run_invocation_timeout": "13800", "AZUREML_PARAMETER_aml_run_max_try": "3", "AZUREML_PARAMETER_aml_process_count_per_node": "8", "AZUREML_PARAMETER_aml_max_concurrency_per_instance": "8", "AZUREML_PARAMETER_aml_error_threshold": "-1" }, "max_concurrency_per_instance": 8,

Additional details

My step is a PromptFlow step and is a parallel job step.

Also, in PromptFlow, the instance count settings are after the flow_component.

https://microsoft.github.io/promptflow/cloud/azureai/use-flow-in-azure-ml-pipeline.html#component-ports-and-run-settings

My BatchEndpoint: https://ml.azure.com/endpoints/batch/magazine-quality-endpoint/detail?wsid=%2Fsubscriptions%2Fcdad8da4-3993-4639-abd6-61ae2ca998c2%2FresourceGroups%2Falgoblock-llm-westus2%2Fproviders%2FMicrosoft.MachineLearningServices%2Fworkspaces%2FAlgoBlock_LLM_westus2&tid=72f988bf-86f1-41af-91ab-2d7cd011db47&reloadCount=1

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,300 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.