Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove abc inheritance from Serializable #8254

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions python/cudf/cudf/core/abc.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Copyright (c) 2020-2021, NVIDIA CORPORATION.
"""Common abstract base classes for cudf."""

import abc
import sys
from abc import abstractmethod

import rmm

Expand All @@ -18,7 +16,7 @@
import pickle # type: ignore


class Serializable(abc.ABC):
class Serializable:
"""A serializable object composed of device memory buffers.

This base class defines a standard serialization protocol for objects
Expand All @@ -32,7 +30,6 @@ class Serializable(abc.ABC):
latter converts back from that representation into an equivalent object.
"""

@abstractmethod
def serialize(self):
"""Generate an equivalent serializable representation of an object.

Expand All @@ -53,10 +50,11 @@ def serialize(self):

:meta private:
"""
pass
raise NotImplementedError(
"Subclasses of Serializable must implement serialize"
)

@classmethod
@abstractmethod
def deserialize(cls, header, frames):
"""Generate an object from a serialized representation.

Expand All @@ -80,7 +78,9 @@ class can be constructed from a serialized representation generalized

:meta private:
"""
pass
raise NotImplementedError(
"Subclasses of Serializable must implement deserialize"
)

def device_serialize(self):
"""Serialize data and metadata associated with device memory.
Expand Down