Open vinayakrajurs opened 1 year ago
I'm not sure of how to fix this, but did you find a solution?
The model expects a dataset with 'unique_id', 'ds', and 'y' columns, such as the ILI data provided as an example. You can download the data in the correct format from datasetsforecast
package (available with pip and https://github.com/Nixtla/datasetsforecast) and the LongHorizon class. The model follows the inputs of the neuralforecast
library (which I also developed).
Hello, Thank you for the quick reply on the previous issue
I'm currently trying to replicate your code in Google Colab. I've added ETTh2.csv to the data folder If we were to run your model on another dataset (such as ETTh2), I changed the path directory in run_spectranet.py Line :88 from
data= pd.read_csv(f'./data/{args.dataset}/{args.dataset}.csv')
todata = pd.read_csv(f'./data/{args.dataset}.csv')
yet I'm running into this error:-------------------------------------------------- ETTh2 -------------------------------------------------- -------------------------------------------------- 24 -------------------------------------------------- -------------------------------------------------- 0.0 -------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexes/base.py", line 3361, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'ds'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "run_spectranet.py", line 205, in
main(args)
File "run_spectranet.py", line 97, in main
data['ds'] = pd.to_datetime(data['ds'])
File "/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py", line 3458, in getitem
indexer = self.columns.get_loc(key)
File "/usr/local/lib/python3.8/dist-packages/pandas/core/indexes/base.py", line 3363, in get_loc
raise KeyError(key) from err
KeyError: 'ds'
What are the other changes that one should do to run your model for ETTh2 Thank You