Skip to content

Commit

Permalink
Impl. CumlArray.deserialize()
Browse files Browse the repository at this point in the history
The "constructor-kwargs" is removed in rapidsai/cudf#12009
  • Loading branch information
madsbk committed Nov 1, 2022
1 parent 3c147bf commit 256a860
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions python/cuml/common/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,15 @@ def serialize(self) -> Tuple[dict, list]:
frames = [CumlArray(f) for f in frames]
return header, frames

@classmethod
@nvtx.annotate(message="common.CumlArray.deserialize", category="utils",
domain="cuml_python")
def deserialize(cls, header, frames):
assert (
header["frame_count"] == 1
), "Only expecting to deserialize Buffer with a single frame."
return cls(frames[0], **header["constructor-kwargs"])

@nvtx.annotate(message="common.CumlArray.copy", category="utils",
domain="cuml_python")
def copy(self) -> Buffer:
Expand Down

0 comments on commit 256a860

Please sign in to comment.