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

Fix ArrowDecoder.decode to return instead of yield #2976

Merged
merged 3 commits into from
Aug 22, 2023

Conversation

lostella
Copy link
Contributor

Description of changes: ArrowDecoder.decode used to yield from something, effectively returning a generator. This meant for example that ArrowFile.__getitem__ also returns a generator when given an integer index, see here. This PR fixes it to make them return a record from the file instead.

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

@lostella lostella requested a review from jaheba August 22, 2023 14:28
@lostella lostella added the bug fix (one of pr required labels) label Aug 22, 2023
@lostella
Copy link
Contributor Author

@abdulfatir in fact, this was the previous behaviour of the decode method, which was changed in #2217

@lostella lostella merged commit c11f91f into awslabs:dev Aug 22, 2023
19 of 21 checks passed
@lostella lostella deleted the fix-arrow-decode branch August 22, 2023 16:20
@lostella lostella added the pending v0.13.x backport This contains a fix to be backported to the v0.13.x branch label Aug 22, 2023
lostella added a commit to lostella/gluonts that referenced this pull request Aug 24, 2023
@lostella lostella mentioned this pull request Aug 24, 2023
lostella added a commit that referenced this pull request Aug 25, 2023
* Turn `type` comparison into `isinstance` (#2958)

* Clean up RepresentablePredictor (#2967)

* Fix: use `isinstance` instead of type comparison (#2973)

* fix type comparison

---------

Co-authored-by: Pedro Eduardo Mercado Lopez <pedroml@amazon.com>

* Fix ArrowDecoder.decode to return instead of yield (#2976)

* Unpin pyarrow version (#2977)

* Fix Cython version in XGBoost tests (#2966)

* black

---------

Co-authored-by: Pedro Mercado <34275963+melopeo@users.noreply.github.com>
Co-authored-by: Pedro Eduardo Mercado Lopez <pedroml@amazon.com>
@lostella lostella removed the pending v0.13.x backport This contains a fix to be backported to the v0.13.x branch label Aug 25, 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.

2 participants