timeseriesAI / tsai

Time series Timeseries Deep Learning Machine Learning Python Pytorch fastai | State-of-the-art Deep Learning library for Time Series and Sequences in Pytorch / fastai
https://timeseriesai.github.io/tsai/
Apache License 2.0
4.92k stars 622 forks source link

use_single_batch in TSStandardize is broken #840

Open bankeiyotaku opened 9 months ago

bankeiyotaku commented 9 months ago

In the setups() call in TSStandardize with use_single_batch=False (default is True), it calls

o = dl.dataset.getitem([slice(None)])[0] to get the entire dataset to calculate the mean/std.

This causes a crash (python 3.10.12) to crash. I was able to fix this by taking the slice(None) out of the list/[] in(009_data_preprocessing.ipynb).

o = dl.dataset.getitem(slice(None))[0] <-- this works