GH-35623: [C++][Python] FixedShapeTensorType.ToString() should print the type's parameters#36496
Conversation
rok
left a comment
There was a problem hiding this comment.
This would be useful! Let's add a c++ test and consider a JSON string?
be44ed5 to
a79ac96
Compare
|
@rok @jorisvandenbossche this should be ready for review with the suggestions included. |
rok
left a comment
There was a problem hiding this comment.
Leaving a suggestion for string helpers. LGTM otherwise!
rok
left a comment
There was a problem hiding this comment.
Looks great! Thanks for adding the utility function!
Co-authored-by: Benjamin Kietzman <bengilgit@gmail.com>
|
Thank you all for the reviews and suggestions! |
|
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 76f987e. There was 1 benchmark result indicating a performance regression:
The full Conbench report has more details. It also includes information about 7 possible false positives for unstable benchmarks that are known to sometimes produce them. |
|
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 76f987e. There was 1 benchmark result indicating a performance regression:
The full Conbench report has more details. It also includes information about 7 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…print the type's parameters (apache#36496) ### Rationale for this change The string representation of two different `FixedShapeTensorType` objects is currently the same: `extension<arrow.fixed_shape_tensor>`. ### What changes are included in this PR? Override general type `ToString()` method for `FixedShapeTensorType`. The string representation of a tensor in this PR is proposed as follows: ``` extension<arrow.fixed_shape_tensor[value_type=*, shape=[*]] ``` ### Are these changes tested? Yes, in Python and in C++. ### Are there any user-facing changes? No. * Closes: apache#35623 Lead-authored-by: AlenkaF <frim.alenka@gmail.com> Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com> Co-authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: AlenkaF <frim.alenka@gmail.com>
…print the type's parameters (apache#36496) ### Rationale for this change The string representation of two different `FixedShapeTensorType` objects is currently the same: `extension<arrow.fixed_shape_tensor>`. ### What changes are included in this PR? Override general type `ToString()` method for `FixedShapeTensorType`. The string representation of a tensor in this PR is proposed as follows: ``` extension<arrow.fixed_shape_tensor[value_type=*, shape=[*]] ``` ### Are these changes tested? Yes, in Python and in C++. ### Are there any user-facing changes? No. * Closes: apache#35623 Lead-authored-by: AlenkaF <frim.alenka@gmail.com> Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com> Co-authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: AlenkaF <frim.alenka@gmail.com>
Rationale for this change
The string representation of two different
FixedShapeTensorTypeobjects is currently the same:extension<arrow.fixed_shape_tensor>.What changes are included in this PR?
Override general type
ToString()method forFixedShapeTensorType. The string representation of a tensor in this PR is proposed as follows:Are these changes tested?
Yes, in Python and in C++.
Are there any user-facing changes?
No.