-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Core] zero-copy serializer for pytorch #12344
[Core] zero-copy serializer for pytorch #12344
Conversation
This PR should be ok. I'll add more tests later. |
This reverts commit 0a505ca
* zero-copy serializer for pytorch * address possible bottleneck * add tests & device support (cherry picked from commit 0a505ca)
The torch import in serialization_addons.py breaks our RLlib test (test_dependency_torch), which checks whether everything would still work, even if torch were not installed (e.g. for tf-only users). |
…ct#12344)" (ray-project#12478)" This reverts commit 3f22448.
@suquark any chance we can bring in back in? |
+1 this was a really cool feature |
Why are these changes needed?
When shifted from PyArrow, we lost zero-copy serialization for torch tensors. This PR not only recovers the zero-copy serialization, it also fixes several bugs in the original serializer.
Related issue number
Closes #4855
Closes #12317
Checks
scripts/format.sh
to lint the changes in this PR.