Hi guys,
I need help!
I have been trying to use pytorch_forecasting with a script of mine and I keep getting the same error when calling the TimeSeriesDataSet function from python_forecasting:
SystemError: CPUDispatcher(<function _find_end_indices at 0x0000012AD9E7FAF8>) returned a result with an error set
After spending a while questioning all the ins and outs of my script, I simply used the generic code available online that is supposed to work, and I am still getting the same error.
Any idea of why pytorch forecasting is triggering that error for me ?
Thanks!
Below is full error, as well as the simple generic code that still does not work:
full error
File “…\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 827, in runfile
execfile(filename, namespace)
File “…\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 110, in execfile
exec(compile(f.read(), filename, ‘exec’), namespace)
File “generictest.py”, line 32, in
time_varying_unknown_reals=[“value”],
File “…\anaconda3\lib\site-packages\pytorch_forecasting\data\timeseries.py”, line 439, in init
self.index = self._construct_index(data, predict_mode=predict_mode)
File “…\anaconda3\lib\site-packages\pytorch_forecasting\data\timeseries.py”, line 1200, in _construct_index
min_length=min_sequence_length,
SystemError: CPUDispatcher(<function _find_end_indices at 0x0000012AD9E7FAF8>) returned a result with an error set
generic code:
import numpy as np
import pandas as pd
test_data = pd.DataFrame(
dict(
value=np.random.rand(30) - 0.5,
group=np.repeat(np.arange(3), 10),
time_idx=np.tile(np.arange(10), 3),
)
)
test_data
from pytorch_forecasting import TimeSeriesDataSet
dataset = TimeSeriesDataSet(
test_data,
group_ids=[“group”],
target=“value”,
time_idx=“time_idx”,
min_encoder_length=5,
max_encoder_length=5,
min_prediction_length=2,
max_prediction_length=2,
time_varying_unknown_reals=[“value”],
)