mirror of
https://github.com/wassname/ray.git
synced 2026-07-01 23:33:18 +08:00
get rid of numbuf sudo command
This commit is contained in:
@@ -47,6 +47,9 @@ def from_primitive(primitive_obj):
|
||||
obj.deserialize(primitive_obj[1])
|
||||
return obj
|
||||
|
||||
def is_arrow_serializable(value):
|
||||
return type(value) == np.ndarray and value.dtype.name in ["int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "uint64", "float32", "float64"]
|
||||
|
||||
def serialize(worker_capsule, obj):
|
||||
primitive_obj = to_primitive(obj)
|
||||
obj_capsule, contained_objrefs = ray.lib.serialize_object(worker_capsule, primitive_obj) # contained_objrefs is a list of the objrefs contained in obj
|
||||
|
||||
Reference in New Issue
Block a user