exam questions

Exam DP-100 All Questions

View all questions & answers for the DP-100 exam

Exam DP-100 topic 4 question 33 discussion

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

DRAG DROP -
You train and register a model by using the Azure Machine Learning SDK on a local workstation. Python 3.6 and Visual Studio Code are installed on the workstation.
When you try to deploy the model into production as an Azure Kubernetes Service (AKS)-based web service, you experience an error in the scoring script that causes deployment to fail.
You need to debug the service on the local workstation before deploying the service to production.
Which four actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: Install Docker on the workstation
Prerequisites include having a working Docker installation on your local system.
Build or download the dockerfile to the compute node.
Step 2: Create an AksWebservice deployment configuration and deploy the model to it
To deploy a model to Azure Kubernetes Service, create a deployment configuration that describes the compute resources needed.
# If deploying to a cluster configured for dev/test, ensure that it was created with enough
# cores and memory to handle this deployment configuration. Note that memory is also used by
# things such as dependencies and AML components.
deployment_config = AksWebservice.deploy_configuration(cpu_cores = 1, memory_gb = 1) service = Model.deploy(ws, "myservice", [model], inference_config, deployment_config, aks_target) service.wait_for_deployment(show_output = True) print(service.state) print(service.get_logs())
Step 3: Create a LocalWebservice deployment configuration for the service and deploy the model to it
To deploy locally, modify your code to use LocalWebservice.deploy_configuration() to create a deployment configuration. Then use Model.deploy() to deploy the service.
Step 4: Debug and modify the scoring script as necessary. Use the reload() method of the service after each modification.
During local testing, you may need to update the score.py file to add logging or attempt to resolve any problems that you've discovered. To reload changes to the score.py file, use reload(). For example, the following code reloads the script for the service, and then sends data to it.
Incorrect Answers:
✑ AciWebservice: The types of web services that can be deployed are LocalWebservice, which will deploy a model locally, and AciWebservice and
AksWebservice, which will deploy a model to Azure Container Instances (ACI) and Azure Kubernetes Service (AKS), respectively.
Reference:
https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-azure-kubernetes-service https://docs.microsoft.com/en-us/azure/machine-learning/how-to-troubleshoot-deployment-local

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
JTWang
Highly Voted 2 years, 1 month ago
My answer: 1.Install Docker on the workstation Create a LocalWebservice deployment configuration for the service and deploy the mode to it 3.Debug and modify the scroing script as necessary. use the reload() method of the service after earch modification. 4.Creae an AksWebservice deployment configuration for the service and deploy the model to it https://learn.microsoft.com/en-us/azure/machine-learning/how-to-deploy-managed-online-endpoints?tabs=python
upvoted 33 times
deyoz
10 months, 1 week ago
I agree with this answer but i want to know if the following sequence is also correct: 1. Create localwebservice 2. debug and modify the scoring script 3. install docker 4. Create Akswebserice
upvoted 3 times
...
...
chevyli
Highly Voted 2 years, 3 months ago
Logically, "Create AksWebService" should be the last step.
upvoted 8 times
Johlec
2 years, 1 month ago
agree with you, you redeploy to aks after finished to debug.
upvoted 2 times
...
...
phdykd
Most Recent 1 year, 9 months ago
Install Docker on the workstation Create a LocalWebservice deployment configuration for the service and deploy the model to it (C) Debug and modify the scoring script as necessary. Use the reload() method of the service after each modification Create an AksWebservice deployment configuration and deploy the model to it
upvoted 2 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 ...