Skip to content

Conversation

@AlenkaF
Copy link
Member

@AlenkaF AlenkaF commented Jun 6, 2023

This PR adds __reduce__ method to the FixedShapeTensorType.

@github-actions github-actions bot added the awaiting review Awaiting review label Jun 6, 2023
@AlenkaF AlenkaF changed the title GH-35599: Implement __reduce__ method for FixedShapeTensorType GH-35599: [Python] Implement __reduce__ method for FixedShapeTensorType Jun 6, 2023
@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jun 6, 2023
@AlenkaF AlenkaF changed the title GH-35599: [Python] Implement __reduce__ method for FixedShapeTensorType GH-35599: [Python] Canonical fixed-shape tensor extension array/type is not picklable. Jun 6, 2023
@AlenkaF AlenkaF marked this pull request as ready for review June 12, 2023 13:30
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jorisvandenbossche jorisvandenbossche merged commit 059d8b6 into apache:main Jun 13, 2023
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Jun 13, 2023
@AlenkaF AlenkaF deleted the gh-35599-extension-type-picklable branch June 13, 2023 10:06
@ursabot
Copy link

ursabot commented Jun 13, 2023

Benchmark runs are scheduled for baseline = 98559fe and contender = 059d8b6. 059d8b6 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.62% ⬆️0.09%] test-mac-arm
[Finished ⬇️0.33% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.39% ⬆️0.03%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 059d8b66 ec2-t3-xlarge-us-east-2
[Finished] 059d8b66 test-mac-arm
[Finished] 059d8b66 ursa-i9-9960x
[Finished] 059d8b66 ursa-thinkcentre-m75q
[Finished] 98559fe0 ec2-t3-xlarge-us-east-2
[Finished] 98559fe0 test-mac-arm
[Finished] 98559fe0 ursa-i9-9960x
[Finished] 98559fe0 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@pitrou
Copy link
Member

pitrou commented Dec 5, 2023

Instead of defining __reduce__ for each concrete extension type, why not define it on BaseExtensionType by making of use of C++-level (de)serialization?

@jorisvandenbossche
Copy link
Member

We actually did that somewhat as a follow-up in #36170, defining __reduce__ on ExtensionType (which can be moved to BaseExtensionType), but with using the Python APIs instead of the C++ APIs (so using self.__arrow_ext_deserialize__ instead of self.ext_type.Deserialize), which then requires those dunders to be implemented (even when it is wrapping one defined in C++). This can indeed be cleaned up.

@pitrou
Copy link
Member

pitrou commented Dec 5, 2023

A cleanup would nice indeed, to avoid such spurious additions.

@AlenkaF
Copy link
Member Author

AlenkaF commented Dec 6, 2023

Opened a new issue: #39094

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge Awaiting merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Python] Canonical fixed-shape tensor extension array/type is not picklable.

4 participants