[Streaming] Streaming data transfer and python integration (#6185)

This commit is contained in:
Chaokun Yang
2019-12-10 20:33:24 +08:00
committed by Hao Chen
parent c1d4ab8bb4
commit 6272907a57
93 changed files with 8434 additions and 1480 deletions
-5
View File
@@ -15,11 +15,6 @@ cdef class Buffer:
See https://docs.python.org/3/c-api/buffer.html for details.
"""
cdef:
shared_ptr[CBuffer] buffer
Py_ssize_t shape
Py_ssize_t strides
@staticmethod
cdef make(const shared_ptr[CBuffer]& buffer):
cdef Buffer self = Buffer.__new__(Buffer)
+1 -12
View File
@@ -19,7 +19,7 @@ from ray.includes.unique_ids cimport (
CObjectID,
CTaskID,
CUniqueID,
CWorkerID,
CWorkerID
)
import ray
@@ -40,8 +40,6 @@ cdef extern from "ray/common/constants.h" nogil:
cdef class BaseID:
# To avoid the error of "Python int too large to convert to C ssize_t",
# here `cdef size_t` is required.
cdef size_t hash(self):
pass
@@ -129,13 +127,6 @@ cdef class UniqueID(BaseID):
cdef class ObjectID(BaseID):
cdef:
CObjectID data
object buffer_ref
# Flag indicating whether or not this object ID was added to the set
# of active IDs in the core worker so we know whether we should clean
# it up.
c_bool in_core_worker
def __init__(self, id):
check_id(id)
@@ -332,8 +323,6 @@ cdef class WorkerID(UniqueID):
return <CWorkerID>self.data
cdef class ActorID(BaseID):
cdef CActorID data
def __init__(self, id):
check_id(id, CActorID.Size())
self.data = CActorID.FromBinary(<c_string>id)