mirror of
https://github.com/wassname/ray.git
synced 2026-07-19 11:27:32 +08:00
[Streaming] Streaming Cross-Lang API (#7464)
This commit is contained in:
@@ -55,6 +55,11 @@ class GatewayClient:
|
||||
call = self._python_gateway_actor.callMethod.remote(java_params)
|
||||
return deserialize(ray.get(call))
|
||||
|
||||
def new_instance(self, java_class_name):
|
||||
call = self._python_gateway_actor.newInstance.remote(
|
||||
serialize(java_class_name))
|
||||
return deserialize(ray.get(call))
|
||||
|
||||
|
||||
def serialize(obj) -> bytes:
|
||||
"""Serialize a python object which can be deserialized by `PythonGateway`
|
||||
|
||||
Reference in New Issue
Block a user