mirror of
https://github.com/wassname/ray.git
synced 2026-08-03 13:10:57 +08:00
[Streaming] Union api (#8612)
This commit is contained in:
@@ -30,7 +30,7 @@ class GatewayClient:
|
||||
|
||||
def create_py_stream_source(self, serialized_func):
|
||||
assert isinstance(serialized_func, bytes)
|
||||
call = self._python_gateway_actor.createPythonStreamSource\
|
||||
call = self._python_gateway_actor.createPythonStreamSource \
|
||||
.remote(serialized_func)
|
||||
return deserialize(ray.get(call))
|
||||
|
||||
@@ -41,10 +41,16 @@ class GatewayClient:
|
||||
|
||||
def create_py_partition(self, serialized_partition):
|
||||
assert isinstance(serialized_partition, bytes)
|
||||
call = self._python_gateway_actor.createPyPartition\
|
||||
call = self._python_gateway_actor.createPyPartition \
|
||||
.remote(serialized_partition)
|
||||
return deserialize(ray.get(call))
|
||||
|
||||
def union(self, *streams):
|
||||
serialized_streams = serialize(streams)
|
||||
call = self._python_gateway_actor.union \
|
||||
.remote(serialized_streams)
|
||||
return deserialize(ray.get(call))
|
||||
|
||||
def call_function(self, java_class, java_function, *args):
|
||||
java_params = serialize([java_class, java_function] + list(args))
|
||||
call = self._python_gateway_actor.callFunction.remote(java_params)
|
||||
|
||||
Reference in New Issue
Block a user