Function of type serving#

Deploying models in MLRun uses the function type serving. You can create a serving function using the set_function() call from a notebook. You can also import an existing serving function/template from the function-hub.

This example converts a notebook to a serving function, adds a model to it, and deploys it:

serving = project.set_function(name="my-serving", func="my_serving.ipynb", kind="serving", image="mlrun/mlrun", handler="handler")
serving.add_model(key="iris", model_path="https://s3.wasabisys.com/iguazio/models/iris/model.pkl", model_class="ClassifierModel")
project.deploy_function(serving)

See also