Sidra API module: ModelServing¶
This module contains endpoints to manage Machine Learning model lifecycle inside Sidra. These endpoints allow forgetting about some technical details like managing Azure resources or using MLflow api to retrieve trained models. More information can be found in the Model Serving Platform section.
It only contains CRUD endpoints. A Model represents the abstract concept of Machine Learning Model and it can be related with zero or many ModelVersion objects, which represents the actual models that solves the problem described in a Model object.
The only special endpoint is DELETE, which ensure that all the ModelVersion related to this Model, and their corresponding resources (MLflow experiments, Docker images, Deployments...) are deleted. The parameter
DeleteMode that can control whether delete related MLflow experiments and/or runs or not.
|Nothing||0||Do not remove anything in MLflow|
|DeleteRunIfNoMore||1||Remove associated Run if there isn't another associated ModelVersion|
|DeleteRunAndExperimentIfNoMore||2||Remove associated Run and Experiment if there isn't another associated ModelVersion|
It contains CRUD enpoints and other endpoints to manage Machine Learning workflow. A ModelVersion an actual representation of a Machine Learning model and its corresponding experiment information, for instance, MLflow experiment, deployment endpoint or Docker image name. This object is versioned so that the user can decide which version of the model will be deployed, undeployed or even deleted.
As the DELETE endpoint of Model, the DELETE endpoint of ModelVersion ensure that all the related resources are completely deleted. It also receives a paramter entitled
DeleteMode to control how to remove MLflow experiments and/or runs. It uses the same values as Model one.
The operations that are allowed on a ModelVersion are, namely: + Create a new Docker image. This endpoints has the hability to create a new ModelVersion if there was none. + Deploy. It deploys a ModelVersion if a Docker image was successfully created. For now, it allows two deployment configurations: Azure Container Instances (ACI) and Azure Kubernetes Service (AKS). + Undeploy. It undeploys a ModelVersion if it was successfully deployed. + Inference. It runs a Databricks notebook to create a new MLflow run with a new trained model. + Job status. It checks the status of the Databricks jobs since the business logic of the previous endpoints is executed asynchronously.