
Answer-first summary for fast verification
Answer: Yes
The solution correctly obtains a reference to the 'ml-project' workspace. The Workspace.get() method requires the workspace name, subscription ID, and resource group to uniquely identify the workspace. In this case, the code provides all three required parameters: name='ml-project', subscription_id='sub-id-2', and resource_group='rg-ml-project'. These parameters match the workspace details provided in the scenario (ml-project workspace in Subscription 2 with resource group rg-ml-project). The community discussion shows some initial confusion, but the consensus and Microsoft documentation confirm that when using Workspace.get() with explicit parameters, all three are required for unambiguous workspace identification across multiple subscriptions.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have the following Azure subscriptions and Azure Machine Learning service workspaces:
ml-prod in resource group rg-ml-prodml-project in resource group rg-ml-projectYou need to obtain a reference to the ml-project workspace.
Solution: Run the following Python code:
from azureml.core import Workspace
ws = Workspace.get(name='ml-project',
subscription_id='sub-id-2',
resource_group='rg-ml-project')
from azureml.core import Workspace
ws = Workspace.get(name='ml-project',
subscription_id='sub-id-2',
resource_group='rg-ml-project')
Does the solution meet the goal?

A
Yes
B
No
No comments yet.