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

deserialization problem when cross platforms #4583

Closed
yunqu opened this issue Apr 9, 2019 · 3 comments
Closed

deserialization problem when cross platforms #4583

yunqu opened this issue Apr 9, 2019 · 3 comments
Labels
P3 Issue moderate in impact or severity

Comments

@yunqu
Copy link

yunqu commented Apr 9, 2019

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04, Ubuntu 18.04
  • Ray installed from (source or binary): source for 18.04, wheels for 16.04
  • Ray version: 0.6.5
  • Python version: 3.6.5
  • Exact command to reproduce:

Describe the problem

When running ray on cross platforms, the serialization/deserialization has problems. The aarch64 platform is running ubuntu 18 while the x86 is running ubuntu 16. I made sure that both have the same python version 3.6.5.

Source code / logs

On X86 side:

python3.6
Python 3.6.5 (default, Apr  8 2019, 15:06:40) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ray
>>> ray.init(redis_address="x.x.x.x:20000")
>>> @ray.remote(resources={'x86_64': 1}) # i have the ray started with a custom resource
... def add2(a,b): 
...     return a+b
... 
>>> import numpy as np
>>> a = np.array([1,2]) 
>>> b = np.array([3,4])
>>> ray.get(add2.remote(a,b))
array([4, 6])

The above works fine, but if I run the following code on X86 side:

>>> @ray.remote(resources={'aarch64':1})             
... def add2(a,b):
...     return a+b
... 
>>> ray.get(add2.remote(a,b))
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
Fatal Python error: Aborted

Stack (most recent call first):
  File "/usr/local/lib/python3.6/site-packages/ray/worker.py", line 460 in _deserialize_object_from_arrow
  File "/usr/local/lib/python3.6/site-packages/ray/worker.py", line 411 in retrieve_and_deserialize
  File "/usr/local/lib/python3.6/site-packages/ray/worker.py", line 528 in get_object
  File "/usr/local/lib/python3.6/site-packages/ray/worker.py", line 2301 in get
  File "<stdin>", line 1 in <module>
Aborted (core dumped)
@pcmoritz
Copy link
Contributor

This is not supported with the automatic serialization (but we should give a better error message). One way around it is to serialize your data using a library that support s cross-platform serialization (e.g. protobuf, messagepack etc.).

@pcmoritz pcmoritz added the P1 Issue that should be fixed within a few weeks label Mar 20, 2020
@ericl ericl added P3 Issue moderate in impact or severity and removed P1 Issue that should be fixed within a few weeks labels May 18, 2020
@ddelange
Copy link
Contributor

Does this bug still exist? i.e. a put from arm64 onto an AMD worker, or from amd onto an arm worker? Towards #12128

@richardliaw
Copy link
Contributor

Will close this since it's been too long and we don't plan to automatically support this. Please reopen a new issue if you still want this feature!

@richardliaw richardliaw closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Issue moderate in impact or severity
Projects
None yet
Development

No branches or pull requests

5 participants