
Answer-first summary for fast verification
Answer: No
The solution does NOT meet the goal because the Workspace.get() method in the azureml.core package requires the subscription_id parameter to be explicitly named when passing it. In the provided code, the subscription_id is passed as a positional argument without the parameter name, which will cause an error. According to the Azure ML documentation and the community discussion, the correct syntax requires named parameters for subscription_id and resource_group. The community consensus (with upvoted comments) confirms that B ('No') is correct, as the subscription_id must be specified with its key in the get method call.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have the following Azure subscriptions and Azure Machine Learning service workspaces:
sub-id-1, Workspace Name: ml-projectsub-id-2, Workspace Name: ml-projectYou need to obtain a reference to the ml-project workspace in the sub-id-1 subscription.
Solution: Run the following Python code:
from azureml.core import Workspace
ws = Workspace.get(name='ml-project',
subscription_id='sub-id-1',
resource_group='rg1')
from azureml.core import Workspace
ws = Workspace.get(name='ml-project',
subscription_id='sub-id-1',
resource_group='rg1')
Does the solution meet the goal?

A
Yes
B
No
No comments yet.