Closed paper-cat closed 3 years ago
Do you have a collab notebook. I am unable to reproduce the error
First of all, thanks for the great package!
I have recently started to experiment with the TFT based on the tutorial. Unfortunately, I am experiencing the same error message as described above:
"Fail to create pixmap with Tk_GetPixmap in TkImgPhotoInstanceSetSize"
Interestingly, I face the problem only for large enough max_epochs
values.
There seems to be a threshold, below which the error cannot be observed and the training runs through without any problem. However, if max_epochs
is large enough, the training stops after a while and the aforementioned error is raised.
I guess there is a memory / buffer issue within related to matplotlib - probably as the memory is not released correctly.
For me, it was matplotlib issue, not pytorch-forecasting.
Just add a line of code at top,
matplotlib.use("Agg")
It works for me.
(Actually, I forgot to leave a comment, sorry for late comment)
TimeSeriesDataSet( data[lambda x: x['week'] <= training_cutoff], time_idx="week", target="order_cnt", categorical_encoders={"item_code": label_encoder, 'channel': ch_encoder}, group_ids=["item_code", "channel"], time_varying_unknown_reals=["order_cnt"], max_encoder_length=context_length, max_prediction_length=prediction_length, allow_missings=True, )
I run my dataset on nbeats following tutorial, and it runs fine for a whlie, then some error raised,
'Fail to create pixmap with Tk_GetPixmap in TkImgPhotoInstanceSetSize'
or something related with pixmap.
Can I get any advise to solve this problem?