zalandoresearch / pytorch-ts

PyTorch based Probabilistic Time Series forecasting framework based on GluonTS backend
MIT License
1.21k stars 191 forks source link

Solved a problem similar to Exception: Reached maximum number of idle transformation calls #130

Open LemonCANDY42 opened 1 year ago

LemonCANDY42 commented 1 year ago
  1. According to the solution of @jaheba in https://github.com/awslabs/gluonts/issues/2694, an optional parameter max_idle_transforms is added to TimeGradEstimator. I guess it can solve problems like Fixes #127 & Fixes #117.
  2. Fixed module 'numpy' has no attribute 'long' problem.
  3. I found that after gluonts V0.10.X, in this commit https://github.com/awslabs/gluonts/commit/4126386da1c71a371a77fe824e5092645dc2d2db, the freq parameter has been removed, so I modified this part to avoid the error: TypeError: PyTorchPredictor .init() got an unexpected keyword argument 'freq'. this Fixes #118.
  4. According to the problem fixed above, the version of gluonts used is 0.12.4.
LemonCANDY42 commented 1 year ago

3. I found that after gluonts V0.10.X, in this commit awslabs/gluonts@4126386, the freq parameter has been removed, so I modified this part to avoid the error: TypeError: PyTorchPredictor .init() got an unexpected keyword argument 'freq'. this Fixes TypeError: init() got an unexpected keyword argument 'freq' #118.

But for the third point, can someone tell me why the freq parameter was removed in gluonts?Any clarification would be greatly appreciated

stathius commented 1 year ago

@LemonCANDY42 Thanks for that. Wish I had seen this PR before. I did 2/3 of the fixes myself (plus another one about the dataset) and was going to open a PR. Could the authors please merge this? @kashif

kashif commented 1 year ago

@stathius ok let me check... do we need to change the notebook?

kashif commented 1 year ago

i am also fixing things up in the 0.7.0 branch if you want to have a look there

c247274901 commented 1 year ago

when I try dpvar,I have the same problem:Reached maximum number of idle transformation calls.

jbgao commented 11 months ago

I think the best way to resolve the issue of "Reached maximum number of idle transformation calls" is to provide a larger number to "num_instances" of ExpectedNumInstanceSampler. At the moment for this example in DeepAREstimator definition, this was fixed to num_instances = 1.0. I think it is better to allow users to provide an appropriate value to this parameters in e.g. DeepAREstimator. When this parameter is small like 1.0 while the time series to very long (say 13K), then the probability to get samples will be 1/13K.