sktime / pytorch-forecasting

Time series forecasting with PyTorch
https://pytorch-forecasting.readthedocs.io/
MIT License
4k stars 632 forks source link

Additional columns added to "data" after calling "TimeSeriesDataSet.from_dataset" #283

Closed huayicodes closed 3 years ago

huayicodes commented 3 years ago

Expected behavior

When running validation = TimeSeriesDataSet.from_dataset(training, data, predict=True, stop_randomization=True), data is not supposed to change.

Actual behavior

The columns 'relative_time_idx', 'encoder_length' are added to data

Code to reproduce the problem

Code in the tutorial works.

Additional information

This problem is not present in version 0.7.1. Not sure about intermediate versions.

huayicodes commented 3 years ago

Same issues after calling raw_predictions, x, index = tft.predict(data, mode="raw", return_x= True, return_index = True)

huayicodes commented 3 years ago

Changing data to 'data.copy()' at https://github.com/jdb78/pytorch-forecasting/blob/master/pytorch_forecasting/data/timeseries.py#L1136 seems to resolve the issue.

jdb78 commented 3 years ago

This is fixed in the current master which will be released shortly