Skip to main content
Run Statsforecast with MLFlow.
MLFlow is an open source experiment tracking system that helps data scientists manage the model lifecycle from experimentation to production. An MLFlow integration for statsforecast is available in the MLFlow library that contains MLFlow support for popular machine learning libraries.
For the next part, mlflow and mlflavors are needed. Install them with:

Model Logging

Viewing Experiment

To view the newly created experiment and logged artifacts open the MLflow UI:

Loading Statsforecast Model

The statsforecast model can be loaded from the MLFlow registry using the mlflow.statsforecast.load_model function and used to generate predictions.

Loading Model with pyfunc

Pyfunc is another interface for MLFlow models that has utilities for loading and saving models. This code is equivalent in making predictions as above.

Model Serving

This section illustrates an example of serving the pyfunc flavor to a local REST API endpoint and subsequently requesting a prediction from the served model. To serve the model run the command below where you substitute the run id printed during execution training code.
After running this, the code below can be ran to send a request.