DP-100 · Question #500
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
The correct answer is C. Load the model and use it to predict labels from input data.. The Azure ML online endpoint scoring script must load the model and return real-time predictions by implementing init() and run() functions.
Question
Options
- ARegister the model with appropriate tags and properties.
- BCreate a Conda environment for the online endpoint compute and install the necessary Python
- CLoad the model and use it to predict labels from input data.
- DStart a node on the inference cluster where the model is deployed.
- ESpecify the number of cores and the amount of memory required for the online endpoint compute.
How the community answered
(62 responses)- B3% (2)
- C90% (56)
- D2% (1)
- E5% (3)
Why each option
The Azure ML online endpoint scoring script must load the model and return real-time predictions by implementing init() and run() functions.
Model registration is a one-time SDK operation performed before deployment and is not a responsibility of the scoring script.
Creating a conda environment is handled through a separate Environment object supplied to the deployment configuration, not within the scoring script itself.
An Azure ML scoring script must implement two required functions: init(), which runs at endpoint startup to load the trained model from the model path into memory, and run(data), which receives each inference request's input data, passes it to the loaded model, and returns the predictions. This structure is mandated by the CodeConfiguration class so the online endpoint can serve real-time requests.
Starting inference cluster nodes is managed automatically by Azure ML infrastructure and is not controlled by the scoring script.
Compute resource requirements such as cores and memory are set in the deployment resource configuration, not in the scoring script.
Concept tested: Azure ML online endpoint scoring script init and run function requirements
Source: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-deploy-online-endpoints
Topics
Community Discussion
No community discussion yet for this question.