A healthcare company has a classification model that is logged and registered as an MLflow model in an Azure Machine Learning workspace. Each night, an upstream job writes several large CSV files containing millions of patient records to a workspace datastore.
Requirements:
- Score all records asynchronously; a scoring run can take several hours.
- Do not write a scoring script or define an environment.
- Keep the deployment definition as YAML files in a Git repository and run it from a GitHub Actions workflow.
Which endpoint type and deployment tool should you use?
Nightly, hours-long scoring of large CSV files calls for a batch endpoint, which runs asynchronous inference at scale. Online endpoints do not accept CSV input for MLflow models. The MLflow SDK cannot deploy MLflow models to batch endpoints, while the CLI v2 can, and no-code deployment removes the need for a scoring script or environment. The CLI v2 is also the recommended choice when deployments are automated in pipelines and stored in Git.
- Correct: A batch endpoint deployed by using the Azure Machine Learning CLI v2. Batch endpoints run asynchronous, long-running inference that scales to large data. The CLI v2 supports deploying MLflow models to batch endpoints. No-code deployment generates the scoring script and environment. The CLI v2 is the recommended tool for automated pipelines and Git-stored configuration.
- Not correct: A batch endpoint deployed by using the MLflow SDK. The deployment-tool support table lists deployment to batch endpoints as not supported by the MLflow SDK. This tool cannot provide the asynchronous batch scoring that is required.
- Not correct: A local MLflow server started by using the MLflow CLI. The MLflow built-in server is for testing models locally. It lacks the asynchronous, long-running batch inference capability that Azure Machine Learning batch endpoints provide.
- Not correct: A batch endpoint deployed by using Azure Machine Learning studio. Studio is recommended for quickly deploying and testing MLflow models through the UI. Automating deployment in pipelines and storing configuration in Git are the reasons to use the CLI v2 or the Python SDK.
- Not correct: A managed online endpoint deployed by using the Azure Machine Learning CLI v2. Online endpoints provide synchronous inference. For MLflow models, CSV-serialized pandas DataFrames are not accepted by online endpoints, and the guidance is to use batch inferencing for that input.