zalandoresearch / pytorch-ts

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

Run out of memory when I tried to run "Time-Grad-Electricity.ipynb" #147

Open ginnux opened 9 months ago

ginnux commented 9 months ago

I am glad to read your article: Autoregressive Denoising Diffusion Models for Multivariate Probabilistic Time Series Forecasting. But when I tried to run "Time-Grad-Electricity.ipynb", it used 77GB memory in total and the python kernel died. The article said, all experiments run on a single Nvidia V100 GPU with 16GB of memory. So, could you please tell me what should I do to run this experiment on my own computer? Thanks!

kashif commented 9 months ago

ah right! so make sure you set the lag indicies to be somewhat limited else if your multivariate dim is large the resulting input vector is of size multivar-dim*len(lag_seq) which might cause memory issues

ginnux commented 9 months ago

Thank you very much for your timely reply. I tried the method you provided above. However, the memory issues still exist. This is the parameter in lags_seq I set:

self.lags_seq = (
            lags_seq
            if lags_seq is not None
            else lags_for_fourier_time_features_from_frequency(freq_str=freq, num_lags=100)
        )

I set num_lags=100 , num_lags=10 and num_lags=3. All attempts have encountered memory errors. Thank you again for your reply.