python/ray/ml/checkpoint.py
def to_bytes(self) -> bytes:
        """Return Checkpoint serialized as bytes object.

        Returns:
            bytes: Bytes object containing checkpoint data.
        """
        # Todo: Add support for stream in the future (to_bytes(file_like))
        data_dict = self.to_dict()
        if "bytes_data" in data_dict:
            return data_dict["bytes_data"]
        return pickle.dumps(self.to_dict())
Return Checkpoint serialized as bytes object.

        Returns:
            bytes: Bytes object containing checkpoint data.
        
Return Checkpoint serialized as bytes object.
Return Checkpoint serialized as bytes object .
def to_bytes(self) -> bytes:
        data_dict = self.to_dict()
        if "bytes_data" in data_dict:
            return data_dict["bytes_data"]
        return pickle.dumps(self.to_dict())
def to_bytes ( self ) -> bytes : data_dict = self . to_dict ( ) if "bytes_data" in data_dict : return data_dict [ "bytes_data" ] return pickle . dumps ( self . to_dict ( ) )
Return Checkpoint serialized as bytes object.
Return Checkpoint serialized as bytes object .
"""Return Checkpoint serialized as bytes object.

        Returns:
            bytes: Bytes object containing checkpoint data.
        """ # Todo: Add support for stream in the future (to_bytes(file_like))
Bytes object containing checkpoint data.
Bytes object containing checkpoint data .
bytes
self