-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maximum size for tensor at dimension
for NBEATS model
#1193
Comments
Hello! The error occurs when you fit the model. Here, the combination of length of training set, validation size and horizon cause the training to fail. Basically, your horizon and validation size are likely too large for the amount of data in the training set. You can try removing the validation set completely or reduce the horizon and that will fix your problem. |
I can reduce the validation set, it's no problem. However, I still want to do long horizon predictions. I mean, "long" is not particularly long here, compared to the training data, but I can live with that. I can accept shorter horizons for direct forecast, it's not a problem. However, I have to implement autoregressive forecasting manually then, which is definitely not convenient. For example, if the model allows forecasting with horizon 128, it's ok, that's quite long. But when I need a forecast of 500, I would have to manually do this in a loop: forecast, append to the input data, forecast, repeat, cut the outputs to the required length. This should be handled by the library underneath, or at least wrapped in a function. |
In that case, you would need to train a model with the longest horizon possible to avoid doing that logic manually. For now, our models can forecast up to horizon I will close this issue because reducing the validation size or the horizon fixes the reported problem. If you want, you can open a new issue requesting a function that allows forecasting on longer horizons using autoregression. |
What happened + What you expected to happen
I am performing a pretty standard long-term forecast:
df_test
has length 1480. When I seth
for value over1178
, I get an error:As such, I can't run NBEATS for long-term forecasting. A similar issue has been reported for TimesNet: #1099. Recursive forecast works, but is quite inconvenient.
Versions / Dependencies
Python 3.10.15, Ubuntu 24.04.
Full
pip list
output:Reproduction script
Just run NBEATS example from docs with long data: https://nixtlaverse.nixtla.io/neuralforecast/models.nbeats.html. I used this dataset: https://archive.ics.uci.edu/dataset/611/hierarchical+sales+data.
Code for loading:
Helper functions:
Issue Severity
High: It blocks me from completing my task.
The text was updated successfully, but these errors were encountered: