nerdexam
Microsoft

DP-100 · Question #360

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…

The correct answer is B. No1. The provided solution using Workspace.from_config() is insufficient to guarantee obtaining a reference to a specific 'ml-project' workspace, especially when multiple subscriptions and workspaces exist without explicit parameters.

Design and prepare a machine learning solution

Question

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?

Exhibit

DP-100 question #360 exhibit

Options

  • AYes
  • BNo1

How the community answered

(44 responses)
  • A
    14% (6)
  • B
    86% (38)

Why each option

The provided solution using `Workspace.from_config()` is insufficient to guarantee obtaining a reference to a specific 'ml-project' workspace, especially when multiple subscriptions and workspaces exist without explicit parameters.

AYes

`Workspace.from_config()` might load *a* workspace, but it does not inherently ensure that the loaded workspace is specifically 'ml-project' when multiple workspaces and subscriptions are present without further explicit configuration or parameters.

BNo1Correct

The `Workspace.from_config()` method by default attempts to load workspace configuration from a local file. In a scenario with multiple subscriptions and workspaces, this method alone cannot reliably target a specific workspace like 'ml-project' without explicit parameters for subscription ID, resource group, and workspace name, or ensuring the local config points to the correct one.

Concept tested: Azure ML Python SDK workspace reference

Source: https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.core.workspace.workspace?view=azureml-py#from-config-path-none--subscription-id-none--resource-group-none--workspace-name-none--_logger-none--base-path-none-

Topics

#Azure Machine Learning#Workspace connection#Python SDK#azureml.core

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice