diff --git a/python/cuml/common/array.py b/python/cuml/common/array.py index bcbc289079..8cceff50f7 100644 --- a/python/cuml/common/array.py +++ b/python/cuml/common/array.py @@ -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.to_host_array", category="utils", domain="cuml_python") def to_host_array(self):