sktime / pytorch-forecasting

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

AssertionError: filters should not remove entries all entries - check encoder/decoder lengths and lags #899

Open AkshatGarg-bot opened 2 years ago

AkshatGarg-bot commented 2 years ago

PyTorch-Forecasting version : 0.9.2 PyTorch version : 1.11.0 Python version: 3.8.10 Operating System : NAME="Ubuntu" VERSION="20.04.2 LTS

Screenshot 2022-03-22 at 10 54 38 AM

It is a time series dataset with continuous time_id for each investment_id as shown in the image. The first and last time_id for each investment_id can be different. The dataset is sorted on the basis of investment_id , time_id as shown in the image

Screenshot 2022-03-22 at 11 17 51 AM

I am running the tft model for individual investment id as small_df. But I am encountering the above error

xinrongl commented 2 years ago

Hey mate,

I also encountered this one yesterday as my first time using this pytorch-forcasting framework.

It seems like you need to encode your id columns as what the offical tutorial did here line 37 (although i don't understand why it is necessary to encode the id) https://github.com/jdb78/pytorch-forecasting/blob/master/examples/ar.py

AkshatGarg-bot commented 2 years ago

The link is not opening can you share a screenshot or provide a new link.

xinrongl commented 2 years ago

image

BreakingDusk397 commented 2 years ago

I am having the same problem. When I try your solution, I get this. @xinrongl

Traceback (most recent call last): File "pytorch_forecast.py", line 79, in <module> categorical_encoders={data["series"]: NaNLabelEncoder(add_nan=True)}, TypeError: unhashable type: 'Series'