Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

too many indices for array: array is 1-dimensional, but 2 were indexed #160

Open
binaryiii opened this issue Feb 3, 2024 · 0 comments
Open

Comments

@binaryiii
Copy link

Dear Author,Is there a time step limit for this model? When I run TimeGrad related code on my own dataset, if the number of time steps exceeds tens of thousands, the following error will be reported
`---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in
1 dataset_train = train_grouper(dataset.train)
----> 2 dataset_test = test_grouper(dataset.test)

E:\anoconda\envs\pytorch\lib\site-packages\gluonts\dataset\multivariate_grouper.py in call(self, dataset)
89 def call(self, dataset: Dataset) -> Dataset:
90 self._preprocess(dataset)
---> 91 return self._group_all(dataset)
92
93 def _preprocess(self, dataset: Dataset) -> None:

E:\anoconda\envs\pytorch\lib\site-packages\gluonts\dataset\multivariate_grouper.py in _group_all(self, dataset)
116 grouped_dataset = self._prepare_train_data(dataset)
117 else:
--> 118 grouped_dataset = self._prepare_test_data(dataset)
119 return grouped_dataset
120

E:\anoconda\envs\pytorch\lib\site-packages\gluonts\dataset\multivariate_grouper.py in _prepare_test_data(self, dataset)
149 list(dataset_at_test_date), dtype=object
150 )
--> 151 grouped_data = self._restrict_max_dimensionality(grouped_data)
152 grouped_data[FieldName.START] = self.first_timestamp
153 grouped_data[FieldName.FEAT_STATIC_CAT] = [0]

E:\anoconda\envs\pytorch\lib\site-packages\gluonts\dataset\multivariate_grouper.py in _restrict_max_dimensionality(self, data)
204 # restrict maximum dimensionality (for faster testing)
205 data[FieldName.TARGET] = data[FieldName.TARGET][
--> 206 -self.max_target_dimension :, :
207 ]
208 return data

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant