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

Error create a custom dataset #592

Closed
StatMixedML opened this issue Jan 31, 2020 · 2 comments
Closed

Error create a custom dataset #592

StatMixedML opened this issue Jan 31, 2020 · 2 comments
Labels
API change This item involves API change

Comments

@StatMixedML
Copy link

Description

The following error is thrown (using the git install version) when I create a custom dataset following the tutorial. Seems to be a recent issue, as it as working Wednesday

To Reproduce

Using the extended forecasting tutorial see here

Error Message


GluonTSDataError Traceback (most recent call last)
in
58 feat_dynamic_real[:, :-custom_ds_metadata['prediction_length']],
59 feat_static_cat)],
---> 60 freq=custom_ds_metadata['freq'])

~/miniconda3/envs/gluonts/lib/python3.6/site-packages/gluonts/dataset/common.py in init(self, data_iter, freq, one_dim_target)
247 ) -> None:
248 process = ProcessDataEntry(freq, one_dim_target)
--> 249 self.list_data = [process(data) for data in data_iter]
250
251 def iter(self) -> Iterator[DataEntry]:

~/miniconda3/envs/gluonts/lib/python3.6/site-packages/gluonts/dataset/common.py in (.0)
247 ) -> None:
248 process = ProcessDataEntry(freq, one_dim_target)
--> 249 self.list_data = [process(data) for data in data_iter]
250
251 def iter(self) -> Iterator[DataEntry]:

~/miniconda3/envs/gluonts/lib/python3.6/site-packages/gluonts/dataset/common.py in call(self, data)
439 def call(self, data: DataEntry) -> DataEntry:
440 for t in self.trans:
--> 441 data = t(data)
442 return data
443

~/miniconda3/envs/gluonts/lib/python3.6/site-packages/gluonts/dataset/common.py in call(self, data)
378 if self.req_ndim != value.ndim:
379 raise GluonTSDataError(
--> 380 f"Array '{self.name}' has bad shape - expected "
381 f"{self.req_ndim} dimensions, got {value.ndim}."
382 )

GluonTSDataError: Array 'feat_dynamic_real' has bad shape - expected 2 dimensions, got 1.

Environment

  • Operating system: Linux
  • Python version: 3
  • GluonTS version: gluonts-0.4.3.dev52+g6f0c16a

(Add as much information about your environment as possible, e.g. dependencies versions.)

@StatMixedML StatMixedML added the bug Something isn't working label Jan 31, 2020
@lostella
Copy link
Contributor

Hi @StatMixedML the issue is probably due to the recently merged #574. The notebook you linked was later updated in #577 to reflect this change, see cells 24 and 25 in its latest version: can you confirm that this works?

Note that we added a link to the master ("latest") version of the documentation in the README, it's better to refer to that if you're working on the master branch, since the "stable" version doesn't get updated until a new release is done.

@lostella lostella added API change This item involves API change and removed bug Something isn't working labels Jan 31, 2020
@StatMixedML
Copy link
Author

StatMixedML commented Feb 3, 2020

Thanks @lostella, the example from the tutorial is working now. You can close the issue.

@lostella lostella closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change This item involves API change
Projects
None yet
Development

No branches or pull requests

2 participants