Nixtla / mlforecast

Scalable machine 🤖 learning for time series forecasting.
https://nixtlaverse.nixtla.io/mlforecast
Apache License 2.0
848 stars 80 forks source link

MLForecast: Create a MLForecast object with pre-trained models for inference deployments #186

Closed pljnagda closed 12 months ago

pljnagda commented 1 year ago

Description

Allow creation of a MLForecast with pre-trained models.

class MLForecast:
    def __init__(
        self,
        models: Models,
        freq: Optional[Freq] = None,
        lags: Optional[Lags] = None,
        lag_transforms: Optional[LagTransforms] = None,
        date_features: Optional[Iterable[DateFeature]] = None,
        differences: Optional[Iterable[int]] = None,
        num_threads: int = 1,
        target_transforms: Optional[List[BaseTargetTransform]] = None,
        is_models_pretrained: bool: = False,
    ):

Use case

Example use case would be a real time inference deployment where each server needs to create a MLForecast object on startup for inference without the need to fit the models.

jmoralez commented 1 year ago

Hey @pljnagda, we usually recommend using pickle (example). Would that not work for your use case?

github-actions[bot] commented 12 months ago

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one.