Bootstrap your large scale forecasting solution on Databricks with Many Models Forecasting (MMF) Project.
Bootstrap your large scale forecasting solution on Databricks with Many Models Forecasting (MMF) Project.
Bootstrap your large-scale forecasting solutions on Databricks with the Many Models Forecasting (MMF) Solution Accelerator.
MMF accelerates the development of forecasting solutions on Databricks, including critical phases of data preparation, training, backtesting, evaluation, scoring, and deployment. Adopting a configuration-over-code approach, MMF minimizes the need for extensive coding. But with its open and extensible architecture, MMF allows technically proficient users to incorporate new models and features. We recommend users to read through the source code, and modify it to their specific requirements.
MMF integrates a variety of well-established and cutting-edge algorithms, including local statistical models, global machine learning / deep learning models, and foundation time series models. MMF enables parallel modeling of hundreds or thousands of time series leveraging Spark's distributed compute. Users can apply multiple models at once and select the best performing one for each time series based on their custom metrics.
Get started now!
Use a cluster with Databricks Runtime 18 for ML or later for all model classes (local, global, and foundation).
run_reconciliation_multilevel) and as MMF Agent Skill 6. See the Hierarchical Reconciliation docs. (lourdesmartinezma)To modify the model hyperparameters or reset the range of the hyperparameter search, change the values in mmf_sa/models/models_conf.yaml or overwrite these values, for example, in mmf_sa/forecasting_conf_daily.yaml if your frequency is D. Different loss functions (e.g. smape, mae, mse, rmse, mape, mase) are supported for training and evaluating global models and can be configured via the loss field in mmf_sa/models/models_conf.yaml.
MMF is fully integrated with MLflow and so once the training kicks off, the experiments will be visible in the MLflow Tracking UI with the corresponding metrics and parameters. Once the training is complete the models will be logged to MLFlow and registered to Unity Catalog.
We encourage you to read through examples/daily/global_daily_dl.ipynb notebook to better understand how global models can be applied to your time series using MMF. An example notebook for forecasting with exogenous regressors can be found in examples/external_regressors/global_external_regressors_daily_dl.ipynb. Refer to the notebook for guidance on performing fine-grained model selection after running run_forecast. See how to define the backtesting parameters here.
Foundation time series models are mostly transformer based models pretrained on millions or billions of time points. These models can perform analysis (i.e. forecasting, anomaly detection, classification) on a previously unseen time series without training or tuning. We support open source models from multiple sources: chronos (Chronos-Bolt and Chronos-2) and timesfm. This is a rapidly changing field, and we are working on updating the supported models and new features as the field evolves.
To get started, attach the examples/daily/foundation_daily.ipynb notebook to a cluster running DBR 18 for ML or later. We recommend using a single-node cluster with multiple GPU instances such as g5.12xlarge [A10G] on AWS or Standard_NC4as_T4_v3 (T4) or Standard_NV36ads_A10_v5 (A10) on Azure. Multi-node setup is currently not supported.
Alternatively, you can run foundation models on serverless GPU compute by passing serverless=True to run_forecast. This routes Chronos and TimesFM inference through a driver-only predict path instead of Spark Pandas UDFs. Required on serverless GPU because Spark Connect Python workers are CPU-only; the trade-off vs the classic-cluster path is no multi-GPU data parallelism. See examples/serverless/foundation_serverless.ipynb for a runnable example.
You can choose the models you want to evaluate and forecast by specifying them in a list:
active_models = [
"ChronosBoltTiny",
"ChronosBoltMini",
"ChronosBoltSmall",
"ChronosBoltBase",
"Chronos2",
"Chronos2Small",
"Chronos2Synth",
"TimesFM_2_5_200m",
]A comprehensive list of models currently supported by MMF is available here.
Now, with the following command, we run examples/run_daily.ipynb notebook that will in turn run run_forecast function. We loop through the active_models list for the same reason mentioned above (see the global model section).
for model in active_models:
dbutils.notebook.run(
"run_daily",
timeout_seconds=0,
arguments={"catalog": catalog, "db": db, "model": model, "run_id": run_id})Inside the examples/run_daily.ipynb, we have the same run_forecast function as above.
To modify the model hyperparameters, change the values in mmf_sa/models/models_conf.yaml or overwrite these values, for example, in mmf_sa/forecasting_conf_daily.yaml if your frequency is D.
MMF is fully integrated with MLflow and so once the training kicks off, the experiments will be visible in the MLflow Tracking UI with the corresponding metrics and parameters. During the evaluation, the models are logged and registered to Unity Catalog.
We encourage you to read through examples/daily/foundation_daily.ipynb notebook to better understand how foundation models can be applied to your time series using MMF. An example notebook for forecasting with exogenous regressors can be found in examples/external_regressors/foundation_external_regressors_daily.ipynb. Refer to the notebook for guidance on performing fine-grained model selection after running run_forecast. See how to define the backtesting parameters here.
MMF supports hierarchical reconciliation as an optional post-forecasting step. After generating base forecasts, reconciliation adjusts them so that they are mathematically coherent across all hierarchy levels — meaning forecasts at each level are consistent with those above and below them in the hierarchy (e.g., store-level forecasts sum to the region forecast, which sums to the country forecast).
The multi-level approach in MMF is to run the full pipeline (run_forecast) once per hierarchy level. This gives you complete f
No open issues yet, or sync has not completed.