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

Remove creation of ragged sequences in MultivariateGrouper #2671

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

abdulfatir
Copy link
Contributor

Issue #, if available: #2612

Description of changes:
Latest numpy versions raise an error when ragged sequences are passed to np.array. An array of ragged sequences is generally not a good idea anyway. This PR fixes the MultivariateGrouper by sidestepping the creation of a ragged array. Instead, a list is used, which is batched based on the number of evaluation dates. The sublists are then stacked to create multivariate time series.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup

@abdulfatir
Copy link
Contributor Author

cc @kashif

@abdulfatir abdulfatir added the bug fix (one of pr required labels) label Feb 18, 2023
@kashif
Copy link
Contributor

kashif commented Feb 19, 2023

LGTM! I will test it out on monday

@lostella
Copy link
Contributor

@abdulfatir if this is backwards compatible, could you label it for v0.11 and v0.12 backport?

@abdulfatir abdulfatir added pending v0.11.x backport This contains a fix to be backported to the v0.11.x branch pending v0.12.x backport This contains a fix to be backported to the v0.12.x branch labels Feb 20, 2023
@abdulfatir abdulfatir merged commit 82d71e3 into awslabs:dev Feb 20, 2023
@abdulfatir abdulfatir deleted the mv-grouper-fix branch February 20, 2023 10:46
lostella added a commit to lostella/gluonts that referenced this pull request Feb 20, 2023
)

Co-authored-by: Abdul Fatir Ansari <ansarnd@amazon.com>
Co-authored-by: Lorenzo Stella <stellalo@amazon.com>
@lostella lostella mentioned this pull request Feb 20, 2023
lostella added a commit to lostella/gluonts that referenced this pull request Feb 20, 2023
)

Co-authored-by: Abdul Fatir Ansari <ansarnd@amazon.com>
Co-authored-by: Lorenzo Stella <stellalo@amazon.com>
@lostella lostella mentioned this pull request Feb 20, 2023
lostella added a commit that referenced this pull request Feb 20, 2023
* Faster index building in PandasDataset (#2663)

* Speed up `PandasDataset.from_long_dataframe` (#2665)

* Fix `DateSplitter` when split date is before start (#2670)

* Remove creation of ragged sequences in MultivariateGrouper (#2671)

Co-authored-by: Abdul Fatir Ansari <ansarnd@amazon.com>
Co-authored-by: Lorenzo Stella <stellalo@amazon.com>

---------

Co-authored-by: Huibin Shen <icdishb@gmail.com>
Co-authored-by: Gerald Woo <woogerald@yahoo.com.sg>
Co-authored-by: Abdul Fatir <Abdulfatirs@gmail.com>
Co-authored-by: Abdul Fatir Ansari <ansarnd@amazon.com>
lostella added a commit that referenced this pull request Feb 20, 2023
* Delay instantiation of `ScipyStudentT` object (#2660)

* Faster index building in PandasDataset (#2663)

* Speed up `PandasDataset.from_long_dataframe` (#2665)

* Fix r-forecast doc strings (#2669)

Co-authored-by: Abdul Fatir Ansari <ansarnd@amazon.com>
Co-authored-by: Pedro Mercado <34275963+melopeo@users.noreply.github.com>

* Fix `DateSplitter` when split date is before start (#2670)

* Remove creation of ragged sequences in MultivariateGrouper (#2671)

Co-authored-by: Abdul Fatir Ansari <ansarnd@amazon.com>
Co-authored-by: Lorenzo Stella <stellalo@amazon.com>

---------

Co-authored-by: Gerald Woo <woogerald@yahoo.com.sg>
Co-authored-by: Huibin Shen <icdishb@gmail.com>
Co-authored-by: Abdul Fatir <Abdulfatirs@gmail.com>
Co-authored-by: Abdul Fatir Ansari <ansarnd@amazon.com>
Co-authored-by: Pedro Mercado <34275963+melopeo@users.noreply.github.com>
@lostella lostella removed pending v0.11.x backport This contains a fix to be backported to the v0.11.x branch pending v0.12.x backport This contains a fix to be backported to the v0.12.x branch labels Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix (one of pr required labels)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants