time-series-foundation-models / lag-llama

Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting
Apache License 2.0
1.09k stars 121 forks source link

How to use wide csv file for training and testing #11

Closed TLF-1234 closed 2 months ago

TLF-1234 commented 4 months ago

I am trying to use a dataset with lots of timeseries data as specified in the: https://ts.gluon.ai/stable/tutorials/data_manipulation/pandasdataframes.html Usecase number 3.

I am unsure on how to use this pandas dataset for this model.

Even when using a single timeseries data as mentioned in the another issue, I am unable to get the forecasts and it shows assertion error: (then its blank)

ashok-arjun commented 4 months ago

Thanks! A tutorial is coming soon about this after a short recoup! I'll post an update here once the tutorial is out.

loveoftheai commented 4 months ago

waiting for that

ashok-arjun commented 4 months ago

Hi @TLF-1234 @loveoftheai , we uploaded a new Colab demo with a tutorial to use a CSV dataset.

Please check it and let us know if your dataset fits into one of the categories explained there.

TLF-1234 commented 4 months ago

Hi @TLF-1234 @loveoftheai , we uploaded a new Colab demo with a tutorial to use a CSV dataset.

Please check it and let us know if your dataset fits into one of the categories explained there.

It does seem similar but i am getting: TypeError: object of type 'NoneType' has no len() Type of data: float32 index: pandas._libs.tslibs.timestamps.Timestamp

I checked for duplicates in data but just can't figure out what is going wrong with this. (There are no Empty Columns or Empty data in between)

shahrokhvahabi commented 4 months ago

Hi @TLF-1234 @loveoftheai , we uploaded a new Colab demo with a tutorial to use a CSV dataset. Please check it and let us know if your dataset fits into one of the categories explained there.

It does seem similar but i am getting: TypeError: object of type 'NoneType' has no len() Type of data: float32 index: pandas._libs.tslibs.timestamps.Timestamp

I checked for duplicates in data but just can't figure out what is going wrong with this. (There are no Empty Columns or Empty data in between)

Hi. This error arises for the first column, DateTime. To avoid this, reformat this column as @turkalpmd mentioned in this link: https://github.com/time-series-foundation-models/lag-llama/issues/10. Also, name the first column 'date,' for instance, to facilitate easy access to this column.

data['date'] = pd.to_datetime(data['date'], format='%Y-%m-%d %H:%M:%S')

ashok-arjun commented 3 months ago

Hi @TLF-1234 @loveoftheai, checking if this is resolved?

ashok-arjun commented 2 months ago

Closing as there is no response. Feel free to reopen if needed!

BennetKoerner commented 2 months ago

The Issue also occurs if your data has a col named something like "date". In order to solve this simply delete the name of the date col in your lets say csv file. Specify the date col using the index in the pd.read_csv method, as its done in the goolge colab nb.