DP-100 · Question #209
DP-100 Question #209: Real Exam Question with Answer & Explanation
The correct answer is C: Load the model and use it to predict labels from input data.. {"question_number": 3, "correct_answer": "C", "explanation": "The entry_script specified in InferenceConfig must implement two functions: init() and run(). The init() function loads the trained model (typically using Model.get_model_path() and a framework-specific load function),
Question
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?
Options
- ARegister the model with appropriate tags and properties.
- BCreate a Conda environment for the web service 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 web service is deployed.
- ESpecify the number of cores and the amount of memory required for the inference compute.
Explanation
{"question_number": 3, "correct_answer": "C", "explanation": "The entry_script specified in InferenceConfig must implement two functions: init() and run(). The init() function loads the trained model (typically using Model.get_model_path() and a framework-specific load function), and the run() function accepts input data, passes it to the model, and returns predictions. Option A (registering the model) is done before deployment, not in the entry script. Option B (creating a Conda environment) is handled by the Environment object passed to InferenceConfig, not the script itself. Options D and E describe infrastructure configuration, not script logic. Only C correctly describes the purpose of the entry script.", "generated_by": "claude-sonnet", "llm_judge_score": 4}
Topics
Community Discussion
No community discussion yet for this question.