Creating Azure ML Compute Cluster with Fewest Properties

DP-100 By islever Editorial Last updated

Short answer

AE size max_instances

Question

You manage an Azure Machine Learning workspace. You must create and configure a compute cluster for a training job by using Python SDK v2. You need to create a persistent Azure Machine Learning compute resource, specifying the fewest possible properties. Which two properties should you define? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
  1. size Correct Answer
  2. win_instances
  3. type
  4. name
  5. max_instances Correct Answer

Key Takeaways

The exam tests knowledge of Azure ML compute entity attributes; the trap is assuming 'name' or 'type' are mandatory when the SDK uses sensible defaults for them in this specific context.

This question tests the minimal configuration required to provision a persistent AmlCompute resource using Python SDK v2. The community consensus confirms that 'size' and 'max_instances' are the correct properties, leveraging smart defaults for others.

Common mistake: Many candidates choose C (type) and D (name), believing these are essential identifiers. However, the SDK allows omitting 'type' by inferring it from the class used, and 'name' can be handled via other mechanisms or defaults in certain contexts, making size and max_instances the critical explicit settings for scaling behavior.

Expert Analysis

Why the Answer Is Correct

According to Microsoft documentation, when creating an AmlCompute object, you must specify the VM size (size) to determine the hardware resources. Additionally, max_instances is crucial for defining the upper limit of the autoscale range, ensuring the cluster can handle job loads efficiently. While name is often provided, the question emphasizes 'fewest possible properties' and 'persistent' nature where scaling limits are operationally significant.

Why the Other Options Are Wrong

Options C (type) and D (name) are frequently selected due to general cloud resource naming conventions. However, in Python SDK v2, the AmlCompute class implicitly sets the type. While name is typically required for unique identification, the specific phrasing regarding 'smart defaults' and the focus on compute capacity points toward size and max_instances as the functional requirements highlighted in the official guidance for this scenario.

Community Comment Notes

Comment [1] and [5] correctly cite the documentation stating that Azure ML uses smart defaults for other properties once size and max_instances are defined. Comment [4] provides code showing name and size, but the exam's specific constraint on 'fewest properties' in the context of persistent scaling favors AE. Comment [7] represents the common misconception favoring CD.

Official Reference

Exam Strategy

Focus on the specific constraints of the SDK version mentioned (v2). When questions ask for 'fewest properties,' look for options that define the core operational behavior (like scaling limits) rather than just identity, assuming the SDK handles defaults intelligently.

Community Votes

AE
80%
CD
20%

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

Discussion 7 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 7

  1. Sadhak 👍 2
    To create a persistent Azure Machine Learning Compute resource in Python, specify the size and max_instances properties. Azure Machine Learning then uses smart defaults for the other properties. size: The VM family of the nodes created by Azure Machine Learning Compute. https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-attach-compute-cluster?view=azureml-api-2&tabs=python
  2. Sadhak 👍 1
    To create a persistent Azure Machine Learning Compute resource in Python, specify the size and max_instances properties. Azure Machine Learning then uses smart defaults for the other properties. size: The VM family of the nodes created by Azure Machine Learning Compute. max_instances: The maximum number of nodes to autoscale up to when you run a job on Azure Machine Learning Compute. https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-attach-compute-cluster?view=azureml-api-2&tabs=python
  3. gunn_m 👍 1
    from azure.ai.ml.entities import AmlCompute from azure.ai.ml import MLClient ml_client = MLClient( credential=DefaultAzureCredential(), subscription_id="your-subscription-id", resource_group_name="your-resource-group", workspace_name="your-workspace-name" ) compute_cluster = AmlCompute( name="my-compute-cluster", size="Standard_DS3_v2" ) ml_client.compute.begin_create_or_update(compute_cluster) A and D
  4. PrenCarr 👍 1
    To create a persistent Azure Machine Learning compute resource with the fewest possible properties using the Python SDK v2, you should define: type © name (D) These two properties are essential for creating the compute resource. The type specifies the kind of compute resource, and the name gives it a unique identifier within your workspace.
  5. avinyc 👍 1
    https://learn.microsoft.com/en-us/AZURE/machine-learning/how-to-create-attach-compute-cluster?view=azureml-api-1&tabs=python
Show 2 more comments
  1. gunn_m 👍 1
    Sorry, my last answer was wrong, the correct answer would be A and E
  2. onurag 👍 1
    should be size and name, type is not essential property

Reader comments & corrections

No reader corrections 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.

← Back to DP-100 Study Guide