-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-34882: [Python] Binding for FixedShapeTensorType #34883
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
GH-34882: [Python] Binding for FixedShapeTensorType #34883
Conversation
cb8145c to
1bdba1d
Compare
jorisvandenbossche
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(some quick comments)
Co-authored-by: Joris Van den Bossche <[email protected]>
|
I suggest we then first use the 3rd option: "Return always the actual C-contiguous array and raise error if permutation is non-trivial" and as Joris mentioned, finetune it in a follow-up PR (after the work on The check for @rok do you agree with the current state of this PR? If yes we could merge it today and get it into 12.0.0. |
rok
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
@jorisvandenbossche if u agree we can go ahead and merge this. |
Co-authored-by: Joris Van den Bossche <[email protected]>
@rok see my comments above?
|
Wouldn't that not be possible with
How about we have pyarrow pass the permutation/strides information by default and have users use lower level API for manual handling of permutation / dim_names? I'm assuming underlying buffer doesn't get actually permuted in either case of course. |
|
Short interruption of the continuation of the thread 😊 Thank you Joris and Rok for all the help and reviews! 🙏 |
What do you mean exactly with "pass the permutation/strides information"? (I suppose you mean returning the permuted/logical array by default?) |
I think so yes :D.
I suppose having this as an opt-in behavior (with the keyword) would work yeah. Just want to make sure this is not on a default path as that would be surprising. |
…rType (#34957) ### Rationale for this change This PR adds examples of the use of `FixedShapeTensorType`to the PyArrow user guide. Should be reviewed and merged after #34883 is done. * Closes: #34956 Lead-authored-by: Alenka Frim <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Rok Mihevc <[email protected]> Signed-off-by: Alenka Frim <[email protected]>
|
Benchmark runs are scheduled for baseline = e488942 and contender = d21c1c7. d21c1c7 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
### Rationale for this change In the C++ the fixed shape tensor canonical extension type is implementated apache#8510 so we can add bindings to the extension type in Python. ### What changes are included in this PR? Binding for fixed shape tensor canonical extension type. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: apache#34882 Lead-authored-by: Alenka Frim <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Joris Van den Bossche <[email protected]> Co-authored-by: Rok Mihevc <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
…eTensorType (apache#34957) ### Rationale for this change This PR adds examples of the use of `FixedShapeTensorType`to the PyArrow user guide. Should be reviewed and merged after apache#34883 is done. * Closes: apache#34956 Lead-authored-by: Alenka Frim <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Rok Mihevc <[email protected]> Signed-off-by: Alenka Frim <[email protected]>
### Rationale for this change In the C++ the fixed shape tensor canonical extension type is implementated apache#8510 so we can add bindings to the extension type in Python. ### What changes are included in this PR? Binding for fixed shape tensor canonical extension type. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: apache#34882 Lead-authored-by: Alenka Frim <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Joris Van den Bossche <[email protected]> Co-authored-by: Rok Mihevc <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
…eTensorType (apache#34957) ### Rationale for this change This PR adds examples of the use of `FixedShapeTensorType`to the PyArrow user guide. Should be reviewed and merged after apache#34883 is done. * Closes: apache#34956 Lead-authored-by: Alenka Frim <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Rok Mihevc <[email protected]> Signed-off-by: Alenka Frim <[email protected]>
Rationale for this change
In the C++ the fixed shape tensor canonical extension type is implementated #8510 so we can add bindings to the extension type in Python.
What changes are included in this PR?
Binding for fixed shape tensor canonical extension type.
Are these changes tested?
Yes.
Are there any user-facing changes?
No.