-
Notifications
You must be signed in to change notification settings - Fork 880
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
Evaluating trained model on new dataset efficiently #1531
Comments
I tried to use different approaches, but got to the same conclusion: as of now, testing is too slow. My guess is: for every timestep, a new "session" is used, that gives the overhead. But that is just a guess on my side. |
We are aware that there is potential of improvement for historical_forecasts, especially for our Regression and TorchForecastinModels. This is high on our to do list.
These two points should drastically reduce processing time. |
I'm also running into this issue but confusion around My setup is to train It looks like
|
Hi @eivindeb,
I am not sure to understand to compatibility issue problem that you are describing between @chengyineng38 your understanding is correct :
|
Closing as historical forecasting/backtesting was optimized for torch models in darts version 0.27.0 |
Hi,
I was wondering what is the intended interface through which one can take a trained model and efficiently use this model on a new dataset to evaluate metrics and/or obtain predictions?
It seems that this is what the methods .backtest and .historical_forecasts are for, however, they run very slowly. This seems to be because they construct datasets of a single data sample, predict on that dataset, and then construct a new dataset for the next sample and so on.
For torch models I am able to emulate backstep using trainer.validate and the ._build_train_dataset function like the attached code example. On my laptop the backtesting method uses ~10x longer than trainer.validate (129.6s vs 15.2s) and the gap increases rapidly with larger amounts of data. The datasets that I want to use darts on contain millions of data samples, so the backtest and historical_forecast methods are too slow to be usable. Is there something I have missed?
The same question goes for obtaining predictions for large amounts of data. I was not able to use the same method (i.e. trainer.predict) to obtain predictions as the PLForecastingModule's predict_step does not seem compatible with the trainer.predict loop logic.
The text was updated successfully, but these errors were encountered: