ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 14 - DP-100 discussion

Report
Export

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
Answers
A.
service.state
B.
service.get_logs()
Answers
B.
service.get_logs()
C.
service.serialize()
Answers
C.
service.serialize()
D.
service.environment
Answers
D.
service.environment
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

asked 02/10/2024
Aur ROULIC
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first