ExamGecko

Microsoft DP-100 Practice Test - Questions Answers, Page 2

Question list
Search
Search

List of questions

Search

Related 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 train and register a machine learning model.

You plan to deploy the model as a real-time web service. Applications must use key-based authentication to use the model.

You need to deploy the web service.

Solution:

Create an AciWebservice instance.

Set the value of the ssl_enabled property to True. Deploy the model to the service.

Does the solution meet the goal?

A.
Yes
A.
Yes
Answers
B.
No
B.
No
Answers
Suggested answer: B

Explanation:

Instead use only auth_enabled = TRUE

Note: Key-based authentication.

Web services deployed on AKS have key-based auth enabled by default. ACI-deployed services have key-based auth disabled by default, but you can enable it by setting auth_enabled = TRUE when creating the ACI web service. The following is an example of creating an ACI deployment configuration with key-based auth enabled.

deployment_config <- aci_webservice_deployment_config(cpu_cores = 1,

memory_gb = 1,

auth_enabled = TRUE)

Reference:

https://azure.github.io/azureml-sdk-for-r/articles/deploying-models.html

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 train and register a machine learning model.

You plan to deploy the model as a real-time web service. Applications must use key-based authentication to use the model.

You need to deploy the web service.

Solution:

Create an AksWebservice instance.

Set the value of the auth_enabled property to True. Deploy the model to the service.

Does the solution meet the goal?

A.
Yes
A.
Yes
Answers
B.
No
B.
No
Answers
Suggested answer: A

Explanation:

Key-based authentication.

Web services deployed on AKS have key-based auth enabled by default. ACI-deployed services have key-based auth disabled by default, but you can enable it by setting auth_enabled = TRUE when creating the ACI web service. The following is an example of creating an ACI deployment configuration with key-based auth enabled.

deployment_config <- aci_webservice_deployment_config(cpu_cores = 1, memory_gb = 1, auth_enabled = TRUE)

Reference:

https://azure.github.io/azureml-sdk-for-r/articles/deploying-models.html

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 train and register a machine learning model.

You plan to deploy the model as a real-time web service. Applications must use key-based authentication to use the model.

You need to deploy the web service.

Solution:

Create an AksWebservice instance.

Set the value of the auth_enabled property to False.

Set the value of the token_auth_enabled property to True. Deploy the model to the service.

Does the solution meet the goal?

A.
Yes
A.
Yes
Answers
B.
No
B.
No
Answers
Suggested answer: B

Explanation:

Instead use only auth_enabled = TRUE

Note: Key-based authentication.

Web services deployed on AKS have key-based auth enabled by default. ACI-deployed services have key-based auth disabled by default, but you can enable it by setting auth_enabled = TRUE when creating the ACI web service. The following is an example of creating an ACI deployment configuration with key-based auth enabled.

deployment_config <- aci_webservice_deployment_config(cpu_cores = 1, memory_gb = 1, auth_enabled = TRUE)

Reference:

https://azure.github.io/azureml-sdk-for-r/articles/deploying-models.html

You use the following Python code in a notebook to deploy a model as a web service:

from azureml.core.webservice import AciWebservice

from azureml.core.model import InferenceConfig

inference_config = InferenceConfig(runtime='python', source_directory='model_files', entry_script='score.py', conda_file='env.yml')

deployment_config = AciWebservice.deploy_configuration(cpu_cores=1, memory_gb=1)

service = Model.deploy(ws, 'my-service', [model], inference_config, deployment_config)

service.wait_for_deployment(True)

The deployment fails.

You need to use the Python SDK in the notebook to determine the events that occurred during service deployment an initialization.

Which code segment should you use?

A.
service.state
A.
service.state
Answers
B.
service.get_logs()
B.
service.get_logs()
Answers
C.
service.serialize()
C.
service.serialize()
Answers
D.
service.environment
D.
service.environment
Answers
Suggested answer: B

Explanation:

The first step in debugging errors is to get your deployment logs. In Python: service.get_logs()

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/how-to-troubleshoot-deployment

You use the Azure Machine Learning Python SDK to define a pipeline that consists of multiple steps.

When you run the pipeline, you observe that some steps do not run. The cached output from a previous run is used instead.

You need to ensure that every step in the pipeline is run, even if the parameters and contents of the source directory have not changed since the previous run.

What are two possible ways to achieve this goal? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

A.
Use a PipelineData object that references a datastore other than the default datastore.
A.
Use a PipelineData object that references a datastore other than the default datastore.
Answers
B.
Set the regenerate_outputs property of the pipeline to True.
B.
Set the regenerate_outputs property of the pipeline to True.
Answers
C.
Set the allow_reuse property of each step in the pipeline to False.
C.
Set the allow_reuse property of each step in the pipeline to False.
Answers
D.
Restart the compute cluster where the pipeline experiment is configured to run.
D.
Restart the compute cluster where the pipeline experiment is configured to run.
Answers
E.
Set the outputs property of each step in the pipeline to True.
E.
Set the outputs property of each step in the pipeline to True.
Answers
Suggested answer: B, C

Explanation:

B: If regenerate_outputs is set to True, a new submit will always force generation of all step outputs, and disallow data reuse for any step of this run. Once this run is complete, however, subsequent runs may reuse the results of this run.

C: Keep the following in mind when working with pipeline steps, input/output data, and step reuse.

If data used in a step is in a datastore and allow_reuse is True, then changes to the data change won't be detected. If the data is uploaded as part of the snapshot (under the step's source_directory), though this is not recommended, then the hash will change and will trigger a rerun.

Reference: https://docs.microsoft.com/en-us/python/api/azureml-pipeline-core/azureml.pipeline.core.pipelinestep https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-getting-started.ipynb

You train a model and register it in your Azure Machine Learning workspace. You are ready to deploy the model as a real-time web service.

You deploy the model to an Azure Kubernetes Service (AKS) inference cluster, but the deployment fails because an error occurs when the service runs the entry script that is associated with the model deployment.

You need to debug the error by iteratively modifying the code and reloading the service, without requiring a re-deployment of the service for each code update.

What should you do?

A.
Modify the AKS service deployment configuration to enable application insights and re-deploy to AKS.
A.
Modify the AKS service deployment configuration to enable application insights and re-deploy to AKS.
Answers
B.
Create an Azure Container Instances (ACI) web service deployment configuration and deploy the model on ACI.
B.
Create an Azure Container Instances (ACI) web service deployment configuration and deploy the model on ACI.
Answers
C.
Add a breakpoint to the first line of the entry script and redeploy the service to AKS.
C.
Add a breakpoint to the first line of the entry script and redeploy the service to AKS.
Answers
D.
Create a local web service deployment configuration and deploy the model to a local Docker container.
D.
Create a local web service deployment configuration and deploy the model to a local Docker container.
Answers
E.
Register a new version of the model and update the entry script to load the new version of the model from its registered path.
E.
Register a new version of the model and update the entry script to load the new version of the model from its registered path.
Answers
Suggested answer: B

Explanation:

How to work around or solve common Docker deployment errors with Azure Container Instances (ACI) and Azure Kubernetes Service (AKS) using Azure Machine Learning.

The recommended and the most up to date approach for model deployment is via the Model.deploy() API using an Environment object as an input parameter. In this case our service will create a base docker image for you during deployment stage and mount the required models all in one call. The basic deployment tasks are:

1. Register the model in the workspace model registry.

2. Define Inference Configuration:

a) Create an Environment object based on the dependencies you specify in the environment yaml file or use one of our procured environments.

b) Create an inference configuration (InferenceConfig object) based on the environment and the scoring script.

3. Deploy the model to Azure Container Instance (ACI) service or to Azure Kubernetes Service (AKS).

You use Azure Machine Learning designer to create a training pipeline for a regression model.

You need to prepare the pipeline for deployment as an endpoint that generates predictions asynchronously for a dataset of input data values.

What should you do?

A.
Clone the training pipeline.
A.
Clone the training pipeline.
Answers
B.
Create a batch inference pipeline from the training pipeline.
B.
Create a batch inference pipeline from the training pipeline.
Answers
C.
Create a real-time inference pipeline from the training pipeline.
C.
Create a real-time inference pipeline from the training pipeline.
Answers
D.
Replace the dataset in the training pipeline with an Enter Data Manually module.
D.
Replace the dataset in the training pipeline with an Enter Data Manually module.
Answers
Suggested answer: C

Explanation:

You must first convert the training pipeline into a real-time inference pipeline. This process removes training modules and adds web service inputs and outputs to handle requests.

Incorrect Answers:

A: Use the Enter Data Manually module to create a small dataset by typing values.

Reference: https://docs.microsoft.com/en-us/azure/machine-learning/tutorial-designer-automobile-price-deploy https://docs.microsoft.com/en-us/azure/machine-learning/algorithm-module-reference/enter-data-manually

You retrain an existing model.

You need to register the new version of a model while keeping the current version of the model in the registry.

What should you do?

A.
Register a model with a different name from the existing model and a custom property named version with the value 2.
A.
Register a model with a different name from the existing model and a custom property named version with the value 2.
Answers
B.
Register the model with the same name as the existing model.
B.
Register the model with the same name as the existing model.
Answers
C.
Save the new model in the default datastore with the same name as the existing model. Do not register the new model.
C.
Save the new model in the default datastore with the same name as the existing model. Do not register the new model.
Answers
D.
Delete the existing model and register the new one with the same name.
D.
Delete the existing model and register the new one with the same name.
Answers
Suggested answer: B

Explanation:

Model version: A version of a registered model. When a new model is added to the Model Registry, it is added as Version 1. Each model registered to the same model name increments the version number.

Reference:

https://docs.microsoft.com/en-us/azure/databricks/applications/mlflow/model-registry

You use the Azure Machine Learning SDK to run a training experiment that trains a classification model and calculates its accuracy metric.

The model will be retrained each month as new data is available.

You must register the model for use in a batch inference pipeline.

You need to register the model and ensure that the models created by subsequent retraining experiments are registered only if their accuracy is higher than the currently registered model.

What are two possible ways to achieve this goal? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

A.
Specify a different name for the model each time you register it.
A.
Specify a different name for the model each time you register it.
Answers
B.
Register the model with the same name each time regardless of accuracy, and always use the latest version of the model in the batch inferencing pipeline.
B.
Register the model with the same name each time regardless of accuracy, and always use the latest version of the model in the batch inferencing pipeline.
Answers
C.
Specify the model framework version when registering the model, and only register subsequent models if this value is higher.
C.
Specify the model framework version when registering the model, and only register subsequent models if this value is higher.
Answers
D.
Specify a property named accuracy with the accuracy metric as a value when registering the model, and only register subsequent models if their accuracy is higher than the accuracy property value of the currently registered model.
D.
Specify a property named accuracy with the accuracy metric as a value when registering the model, and only register subsequent models if their accuracy is higher than the accuracy property value of the currently registered model.
Answers
E.
Specify a tag named accuracy with the accuracy metric as a value when registering the model, and only register subsequent models if their accuracy is higher than the accuracy tag value of the currently registered model.
E.
Specify a tag named accuracy with the accuracy metric as a value when registering the model, and only register subsequent models if their accuracy is higher than the accuracy tag value of the currently registered model.
Answers
Suggested answer: C, E

Explanation:

E: Using tags, you can track useful information such as the name and version of the machine learning library used to train the model. Note that tags must be alphanumeric.

Reference:

https://notebooks.azure.com/xavierheriat/projects/azureml-getting-started/html/how-to-use-azureml/deployment/register-model-create-image-deploy-service/register-model-create-image-deploy-service.ipynb

You are a data scientist working for a hotel booking website company. You use the Azure Machine Learning service to train a model that identifies fraudulent transactions.

You must deploy the model as an Azure Machine Learning real-time web service using the Model.deploy method in the Azure Machine Learning SDK. The deployed web service must return real-time predictions of fraud based on transaction data input.

You need to create the script that is specified as the entry_script parameter for the InferenceConfig class used to deploy the model.

What should the entry script do?

A.
Register the model with appropriate tags and properties.
A.
Register the model with appropriate tags and properties.
Answers
B.
Create a Conda environment for the web service compute and install the necessary Python packages.
B.
Create a Conda environment for the web service compute and install the necessary Python packages.
Answers
C.
Load the model and use it to predict labels from input data.
C.
Load the model and use it to predict labels from input data.
Answers
D.
Start a node on the inference cluster where the web service is deployed.
D.
Start a node on the inference cluster where the web service is deployed.
Answers
E.
Specify the number of cores and the amount of memory required for the inference compute.
E.
Specify the number of cores and the amount of memory required for the inference compute.
Answers
Suggested answer: C

Explanation:

The entry script receives data submitted to a deployed web service and passes it to the model. It then takes the response returned by the model and returns that to the client. The script is specific to your model. It must understand the data that the model expects and returns.

The two things you need to accomplish in your entry script are:

Loading your model (using a function called init())

Running your model on input data (using a function called run())

Reference: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-and-where

Total 433 questions
Go to page: of 44