Open chododom opened 1 year ago
The error message is indeed hard to decode in the case when no time_varying values are provided. Note that there are some extra features that DataLoader can add like relative_time_idx which are not part of the time_varying_known_reals
argument by itself so just checking that argument isn't sufficient. But always adding time_idx isn't necessarily desirable because it can be just an aux feature that can make training less stable or lead to overfit
Expected behavior
I have a dataset with several time series (various real-numbered climatic variables such as
temperature
,wind_speed
, etc. and a static categorical identification of a weather stationstation_id
) and I create a TimeSeriesDataSet with a time index oftime_idx
. I set the climatic variables as time varying unknown reals and thestation_id
as a static categorical variable. I did not think about setting thetime_idx
variable as a time varying known real, because since the class definition requires a time index and its column name, I assumed it knows what it is.Here is the code:
I expected this would train the model correctly and I will be able to use the model for predictions.
Actual behavior
However, the training looked weird (although epochs were gradually increasing, in none of them was the progress bar moving, it always suddenly skipped from 0 % right to the next epoch). Additionally, when running the
predict
method, the output was an empty list[]
.When I defined the
time_idx
within thetime_varying_known_reals
argument, it all started working, the epochs were gradually increasing with the progress bar working and the prediction outputs some results.I would either expect that the
time_idx
would automatically be considered one of the time varying known reals (I didn't notice this anywhere in the docs), or perhaps there is a good reason not to do this, but in that case it would be nice to get an informative error message when thepredict
function propagates to theTemporalFusionTransformer
method where after this line:the code abruptly ends without any message or exception. Maybe there could be a sanity check that
self.decoder_variables
is not empty.Perhaps I am missing something, if so, I apologize and kindly ask for an explanation. Thank you!