Skip to content

batched Inference with Different Frequencies #3255

@e-hossam96

Description

@e-hossam96

Hello All

Description

We need a way to handle batch inference with different frequencies. I searched the entire documentation and I couldn't point my finger on it.

To Reproduce

This is the current example function I use. I pass the Dataset a list of data frames, each with the "target" column and "datetime" index.

def get_forecast(
    data: pd.DataFrame | list[pd.DataFrame],
    forecaster: PyTorchPredictor | ProphetPredictor,
) -> list[np.ndarray]:
    torch.manual_seed(forecasting_settings.seed)
    seed_everything(forecasting_settings.seed)
    results = list(forecaster.predict(dataset=PandasDataset(data)))
    demands = [np.median(result.samples, axis=0) for result in results]
    return demands

Error message or code output

The code works fine but it takes so long to complete.

Environment

  • Win 11
  • Python version: 3.12.9
  • GluonTS version: gluonts[prophet,torch]==0.14.4
  • MXNet version: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions