Deploying using Ray Serve and MLflow deployment plugins
A more generic way to do deployment is to use a framework such as Ray Serve (https://docs.ray.io/en/latest/serve/index.html). Ray Serve has several advantages, such as DL model frameworks agnostics, native Python support, and supporting complex model composition inference patterns. Ray Serve supports all major DL frameworks and any arbitrary business logic. So, can we leverage both Ray Serve and MLflow to do model deployment and serve? The good news is that we can use the MLflow deployment plugins provided by Ray Serve to do this. Let's walk through how to use the mlflow-ray-serve
plugin to do MLflow model deployment using Ray Serve (https://github.com/ray-project/mlflow-ray-serve). Before we begin, we need to install the mlflow-ray-serve
package:
pip install mlflow-ray-serve
Then, we need to start a single node Ray cluster locally first using the following two commands:
ray start --head serve start
This will...