Configure Serverless Compute Instance Type Count Azure ML SDK v2

You manage an Azure Machine Learning workspace. You design a training job that is configured with a serverless compute. The serverless compute must have a specific instance type and count. You need to configure the serverless compute by using Azure Machine Learning Python SDK v2. What should you do?

  1. Specify the compute name by using the compute parameter of the command job.
  2. Configure the tier parameter to Dedicated VM.
  3. Initialize and specify the ResourceConfiguration class. Source Reference Answer
  4. Initialize AmiCompute class with size and type specification.

Community Votes

C
67%
D
33%

67% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

The exam tests the distinction between serverless compute configuration and managed cluster creation; the common trap is confusing AmlCompute (for clusters) with ResourceConfiguration (for serverless job constraints).

This question tests the correct method for specifying instance type and count for serverless compute in Azure ML Python SDK v2. The community consensus confirms that ResourceConfiguration is the appropriate class for this task, distinguishing it from managed compute cluster configurations.

Option D (AmlCompute) is the most common wrong answer because candidates often assume all compute targets use the AmlCompute class, failing to recognize that serverless jobs require explicit resource constraints via ResourceConfiguration rather than a pre-provisioned cluster definition.

Community Discussion (4 comments)

ulg 👍 1 Selected: C
To configure serverless compute with a specific instance type and count in Azure Machine Learning using the Python SDK v2, you need to use the ResourceConfiguration class.
avinyc 👍 1 Selected: C
Correct answer should be ResourceConfiguration (C). The AmlCompute class is used for creating managed compute clusters, not for configuring serverless compute.
Sadhak 👍 1 Selected: D
https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.compute.amlcompute(class)?view=azure-ml-py
AzureGeek79 👍 1
Given answer is correct.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

In Azure Machine Learning Python SDK v2, when using serverless compute, you do not provision a persistent cluster. Instead, you define the resources required for the specific job run. The ResourceConfiguration class allows you to specify the exact instance type (SKU) and the number of nodes (count) needed for the training job to execute efficiently within the serverless environment.

Why the Other Options Are Wrong

Option D is incorrect because AmlCompute is used to create and manage dedicated virtual machine clusters, which involves provisioning infrastructure before jobs run. Option B is invalid as 'Dedicated VM' is not a valid parameter for configuring serverless compute constraints. Option A is incorrect because simply naming the compute target does not allow you to enforce specific hardware requirements or node counts dynamically for a serverless run.

Community Comment Notes

Comment [2] correctly highlights that AmlCompute is for managed clusters, not serverless. Comment [1] explicitly identifies ResourceConfiguration as the required class for setting instance types and counts. While Comment [3] cites documentation for AmlCompute, it inadvertently supports why D is wrong for this specific serverless scenario.

Official Reference

Exam Strategy

Always distinguish between 'provisioned' compute (like AmlCompute clusters) and 'serverless' compute (pay-per-use). For serverless jobs, look for options involving runtime resource specification (like ResourceConfiguration) rather than infrastructure management classes.

Related Analysis

← Back to DP-100 Study Guide