Closed eudoxos closed 3 years ago
Pyro supports this by creating custom (de)serializers for classes. The problem I here is that you want this for tuples which are a primitive type. Also msgpack can't serialize custom classes. So no, you cannot do this with Pyro itself.
However, consider one of the following?
Hi, unfortunately the client code does make a distinction of lists and tuples.
I switched to serpent (hwere I have the issue with bytes
being returned as a dict on the remote end, so needs some special-casing), but as far as I was concerned, msgpack was faster. Just did not work with the tuples, right.
Tuple sent over the wire will be deserialized as list; this is a "feature" of msgpack. Other projects were facing this as well, e.g. https://github.com/dask/distributed/issues/3716#issuecomment-632913789 . Their idea is to add a special tag to tuples so that they can be reconstructed properly. Could something like this be done in Pyro as well?