exam questions

Exam DP-100 All Questions

View all questions & answers for the DP-100 exam

Exam DP-100 topic 4 question 17 discussion

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

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
  • B. service.get_logs()
  • C. service.serialize()
  • D. service.environment
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
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

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
james2033
7 months, 3 weeks ago
Selected Answer: B
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) logging like this ml_client.online_deployments.get_logs(name = "<deployment-name>", endpoint_name = "<endpoint-name>", lines=100) https://learn.microsoft.com/en-us/azure/machine-learning/how-to-troubleshoot-online-endpoints?view=azureml-api-2&tabs=python#get-container-logs
upvoted 1 times
...
therealola
1 year, 11 months ago
On exam 18-06-22
upvoted 1 times
...
pancman
2 years, 2 months ago
Duplicate question
upvoted 1 times
...
AjoseO
2 years, 3 months ago
On Exam: 03 March 2022
upvoted 3 times
...
nick234987
2 years, 8 months ago
Correct answer B
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 ...