awslabs / gluonts

Probabilistic time series modeling in Python
https://ts.gluon.ai
Apache License 2.0
4.57k stars 749 forks source link

Unexpected Requirement for Prediction Horizon Feature Values with use_feat_dynamic_real=True in Predict Function #3101

Open gokhankoc90 opened 8 months ago

gokhankoc90 commented 8 months ago

Description

In my setup, I have begun using use_feat_dynamic_real=True and have included one feature. Training and back-testing using historical features proceed without issues. However, an error occurs during prediction when only historical features are supplied, without providing their future values. The error indicates that dimensions 0 and 2 must be of the same size. Here, dimension 0 appears to include the context step size plus the prediction step, whereas dimension 2 only contains the feature values that correspond to the context step size. Steps to Reproduce

Execute prediction with at least one dynamic feature, ensuring that only historical feature data is provided. Do not supply future values of the feature, and refrain from methods such as forward-filling or zero-filling. Error Message or Code Output

Environment

Operating System: Debian 12
Python Version: 3.11.6
GluonTS Version: Latest
MXNet Version: Latest
gokhankoc90 commented 8 months ago

As I delved further, I realized that the same problem has existed since 2021 and was requested as a new feature called past_feat_dynamic_real (https://github.com/awslabs/gluonts/pull/1757).

It's surprising that such a mission-critical feature has not been completed in 3 years.

I'm questioning if DeepAR can be effectively utilized at all without this feature being added...

Could someone clarify if I've misunderstood something?