Open Antoine-Schwartz opened 1 year ago
May be connected directly or indirectly with this issue?
Not sure if it helps, but what solved the issue for me was changing the transformation (softplus) : for "some" reason it produces very small predictions (e-17), that gets interpreted as NaNs (float32) , consequentially reducing loss (and therefore) predictions to NaN.
I'm currently using no transformation. still experimenting to understand the exact reasons of this behaviour
@alaameloh Any luck figuring out the exact reason ? also where exactly did you change the transformation if you don't mind sharing ?
@youssefmecky96 didn't pursue the matter for the time being (priorities)
you can set the target transformation using the target_normalizer
parameter of TimeSeriesDataSet
.
you can set it to auto
Expected behavior
I have series of all sizes in my dataset, including several that are smaller than my
max_prediction_length
. However, the minimum length is 1 (I haven't yet tried the "pure" cold-start experience).To ensure that TFT is able to provide forecasts regardless of the length of the series, I set
min_encoder_length
to 0. With these configurations, I should be able to produce forecasts for all series.Actual behavior
For some reason I don't understand, I have no problem when I don't normalize the target by group, but when I do, the forecasts for all series of length 1 are NaNs ==> no problem for lengths 2 or more!
I've already tested and checked a lot of things and I've dived into the source code to try to understand. It seems that the problem arises at the
predict
time, I haven't seen anything unusual before, for example in the construction of datasets... Have I misunderstood something? Or is it an side-effect bug in the GroupNormalizer during inference?Code to reproduce the problem