Microsoft

DP-100 Free Practice Questions — Page 13

Question 129

HOTSPOT - You manage an Azure Machine Learning workspace named workspace1 by using the Python SDK v2. You must register datastores in workspace1 for Azure Blob and Azure Data Lake Gen2 storage to meet the following requirements: • Data scientists accessing the datastore must have the same level of access. • Access must be restricted to specified containers or folders. You need to configure a security access method used to register the Azure Blob and Azure Data Lake Gen2 storage in workspace1. Which security access method should you configure? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 129
Show Answer
Correct Answer: Azure Blob storage: User identity-based access Azure Data Lake Gen2 storage: Managed identity
Explanation:
User identity-based access for Azure Blob storage ensures all data scientists authenticate via Azure AD and can be granted identical permissions scoped to specific containers. For Azure Data Lake Gen2, managed identity is used so the Azure ML workspace accesses data using a single identity with ACLs applied at container or folder level, ensuring consistent access and fine-grained restriction.

Question 130

HOTSPOT - You are creating data wrangling and model training solutions in an Azure Machine Learning workspace. You must use the same Python notebook to perform both data wrangling and model training. You need to use the Azure Machine Learning Python SDK v2 to define and configure the Synapse Spark pool asynchronously in the workspace as dedicated compute. How should you complete the code segment? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 130
Show Answer
Correct Answer: SynapseSparkCompute ml_client.begin_create_or_update
Explanation:
To configure a Synapse Spark pool as dedicated compute with the Azure ML SDK v2, you must use the SynapseSparkCompute class. Because the compute creation is asynchronous, it must be registered using begin_create_or_update rather than create_or_update.

Question 131

DRAG DROP - You manage an Azure Machine Learning workspace named workspace1 with a compute instance named compute1. You connect to compute1 by using a terminal window from workspace1. You create a file named "requirements.txt” containing Python dependencies to include Jupyter. You need to add a new Jupyter kernel to compute1. Which four commands should you use? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Illustration for DP-100 question 131
Show Answer
Correct Answer: conda create -n "python_env" conda activate "python_env" conda install -r "requirements.txt" ipython kernel install --user --name="python_env"
Explanation:
Create a new Conda environment, activate it, install the required Python packages from requirements.txt, and then register the environment as a Jupyter kernel so it appears in Jupyter notebooks.

Question 132

You create a workspace to include a compute instance by using Azure Machine Learning Studio. You are developing a Python SDK v2 notebook in the workspace. You need to use Intellisense in the notebook. What should you do?

A. Stop the compute instance.
B. Start the compute instance.
C. Run a %pip magic function on the compute instance.
D. Run a !pip magic function on the compute instance.
Show Answer
Correct Answer: B
Explanation:
In Azure Machine Learning Studio, IntelliSense in Python SDK v2 notebooks is available only when the compute instance is running. A running compute instance provides the backend kernel and language services required for code completion and inline help. Stopping the instance disables these features, and running pip magic commands only installs packages without enabling IntelliSense.

Question 133

HOTSPOT - You create an Azure Machine Learning workspace. You use the Azure Machine Learning Python SDK v2 to create a compute cluster. The compute cluster must run a training script. Costs associated with running the training script must be minimized. You need to complete the Python script to create the compute cluster. How should you complete the script? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 133
Show Answer
Correct Answer: AmlCompute tier="LowPriority"
Explanation:
Use an AmlCompute cluster for scalable training. Setting the tier to LowPriority uses spot/low-priority VMs, minimizing the cost incurred while the training script runs (min_instances defaults to 0).

Question 134

HOTSPOT - You manage an Azure Machine Learning workspace. You must define the execution environments for your jobs and encapsulate the dependencies for your code. You need to configure the environment from a Docker build context. How should you complete the code segment? To answer, select the appropriate option in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 134
Show Answer
Correct Answer: Environment build
Explanation:
In Azure Machine Learning, execution environments created from a Docker build context are defined using the Environment class, and the Docker build context is specified via the build parameter with BuildContext(path=...).

Question 135

You manage an Azure Machine Learning workspace named workspace1. You must develop Python SDK v2 code to add a compute instance to workspace1. The code must import all required modules and call the constructor of the ComputeInstance class. You need to add the instantiated compute instance to workspace1. What should you use?

A. constructor of the azure.ai.ml.ComputeSchedule class
B. constructor of the azure.ai.ml.ComputePowerAction enum
C. begin_create_or_update method of an instance of the azure.ai.ml.MLCIient class
D. set_resources method of an instance of the azure.ai.ml.Command class
Show Answer
Correct Answer: C
Explanation:
In Azure Machine Learning Python SDK v2, compute resources (including ComputeInstance) are created or updated by instantiating the ComputeInstance object and then submitting it to the workspace using an MLClient. This is done with the begin_create_or_update method of an azure.ai.ml.MLClient instance. The other options relate to scheduling, power actions, or job resource configuration and do not add a compute instance to a workspace.

Question 136

DRAG DROP - You manage an Azure Machine Learning workspace named workspace1 by using the Python SDK v2. You must register datastores in workspace1 for Azure Blob storage and Azure Files storage to meet the following requirements: • Azure Active Directory (Azure AD) authentication must be used for access to storage when possible. • Credentials and secrets stored in workspace1 must be valid for a specified time period when accessing Azure Files storage. You need to configure a security access method used to register the Azure Blob and Azure Files storage in workspace1. Which security access method should you configure? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 136
Show Answer
Correct Answer: Azure Blob storage: Identity-based access Azure Files storage: Shared Access Signature (SAS)
Explanation:
Azure Blob storage supports Azure AD–based (identity-based) authentication and should use it when possible to avoid secrets. Azure Files storage in Azure Machine Learning requires credentials with a defined validity period, which is met by using a SAS token that provides time-limited access.

Question 137

You manage an Azure Machine Learning workspace. The workspace includes an Azure Machine Learning Kubernetes compute target configured as an Azure Kubernetes Service (AKS) cluster named AKS1. AKS1 is configured to enable the targeting of different nodes to train workloads. You must run a command job on AKS1 by using the Azure ML Python SDK v2. The command job must select different types of compute nodes. The compute node types must be specified by using a command parameter. You need to configure the command parameter. Which parameter should you use?

A. environment
B. compute
C. limits
D. instance_type
Show Answer
Correct Answer: D
Explanation:
In Azure ML Python SDK v2, when submitting a command job to an AKS (Kubernetes) compute target, the compute parameter specifies the cluster itself, not the node type. To target different node pools or VM sizes within an AKS cluster, you must specify the node type via the instance_type parameter (or resources.instance_type). This allows the job to select different compute node types within the same AKS compute target.

Question 138

HOTSPOT - You manage an Azure Machine Learning workspace named workspace1 with a compute instance named compute1. You must remove a kernel named kernel1 from compute1. You connect to compute1 by using a terminal window from workspace1. You need to enter a command in the terminal window to remove kernel. Which command should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 138
Show Answer
Correct Answer: jupyter kernelspec uninstall kernel1
Explanation:
Azure ML compute instances use Jupyter kernels. The `jupyter kernelspec uninstall <name>` command removes the specified kernel from the compute instance.

$19

Get all 477 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.