exam questions

Exam DP-100 All Questions

View all questions & answers for the DP-100 exam

Exam DP-100 topic 2 question 77 discussion

Actual exam question from Microsoft's DP-100
Question #: 77
Topic #: 2
[All DP-100 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have the following Azure subscriptions and Azure Machine Learning service workspaces:



You need to obtain a reference to the ml-project workspace.

Solution: Run the following Python code:



Does the solution meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Skip73
Highly Voted 1 year, 7 months ago
Selected Answer: B
Correct Answer is B. You need to reference to the workspace using ws = Workspace.from_config() The config.json contains the subscription_id, resource-id and the workspace name which are required to get the reference to the workspace.
upvoted 6 times
...
evangelist
Most Recent 6 months, 2 weeks ago
Selected Answer: B
The answer is NO, This code attempts to obtain a reference to the Azure Machine Learning workspace named "ml-project" using the Workspace.get method with only the name parameter. However, the Workspace.get method requires additional parameters to uniquely identify the workspace, such as subscription_id and resource_group. Without these parameters, the method will not be able to locate and reference the workspace correctly.
upvoted 4 times
...
Plb2
9 months, 3 weeks ago
Selected Answer: B
besides the wsname, subid and rgname should be provided ws = Workspace.get(name="myworkspace", subscription_id='<azure-subscription-id>', resource_group='myresourcegroup')
upvoted 3 times
Plb2
9 months, 3 weeks ago
adding to this; subid is required if user has access to multiple subscriptions, so in this case it is.
upvoted 1 times
...
...
zishankamal
10 months ago
Selected Answer: A
ws = Workspace.get(name="myworkspace", subscription_id='<azure-subscription-id>', resource_group='myresourcegroup') subscription_id and resource_group are option parameters.
upvoted 1 times
...
Matt2000
10 months, 1 week ago
Yes. Reference: https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.workspace.workspace?view=azure-ml-py#azureml-core-workspace-workspace-get
upvoted 1 times
...
LadyCasilda
1 year, 3 months ago
On exam 18 August 2023
upvoted 3 times
...
skumarliaison
1 year, 4 months ago
Selected Answer: A
get Return a workspace object for an existing Azure Machine Learning Workspace. Parameters name - str - Required https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.workspace.workspace?view=azure-ml-py#azureml-core-workspace-workspace-get
upvoted 2 times
...
PI_Team
1 year, 4 months ago
Selected Answer: B
The code snippet will not work because the Workspace.get() method requires the subscription ID and resource group of the workspace as well as the workspace name. The config.json file only contains the workspace name, so the code will not be able to find the workspace. from azureml.core import Workspace subscription_id = "5a5891d1-557a-4234-9b83-2e90412b1068" resource_group = "my-resource-group" workspace_name = "ml-project" ws = Workspace(subscription_id, resource_group, workspace_name) SaM
upvoted 3 times
...
phydev
1 year, 4 months ago
On exam 20 July 2023.
upvoted 4 times
...
BrahderLau
1 year, 6 months ago
Answer: Yes ws = Workspace.get(name="myworkspace", subscription_id='<azure-subscription-id>', resource_group='myresourcegroup') Reference: https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.workspace.workspace?view=azure-ml-py#remarks
upvoted 2 times
BrahderLau
1 year, 6 months ago
* Answer: No. Because subscription_id and resoruce group is not provided
upvoted 4 times
...
...
rishi_ram
1 year, 6 months ago
Selected Answer: B
workspace_name is correct parameter not 'name' https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.workspace.workspace?view=azure-ml-py Answer is B for sure
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...