Creating Azure ML Compute Cluster with Fewest Properties
Short answer
AE size max_instances
Question
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
This link opens the official vendor documentation in a new tab.
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
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
-
Sadhak 👍 2To 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
-
Sadhak 👍 1To 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
-
gunn_m 👍 1from 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
-
PrenCarr 👍 1To 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.
-
avinyc 👍 1https://learn.microsoft.com/en-us/AZURE/machine-learning/how-to-create-attach-compute-cluster?view=azureml-api-1&tabs=python
Show 2 more comments
-
gunn_m 👍 1Sorry, my last answer was wrong, the correct answer would be A and E
-
onurag 👍 1should 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.