petkopetkov's picture
LADDER RoboLab-Long for LeRobot EnvHub (LADDER v1.0.0)
01171b7 verified
Raw History Blame Contribute Delete
332 Bytes
from typing import Any, Dict
import msgpack
import msgpack_numpy
# apply msgpack_numpy monkey-patch to enable automatic numpy serialization
msgpack_numpy.patch()
def serialize(data: Dict[str, Any]) -> bytes:
return msgpack.packb(data)
def deserialize(message: bytes) -> Dict[str, Any]:
return msgpack.unpackb(message)