Skip to content

deserialize.from_proto

Full path: schola.core.protocols.protobuf.deserialize.from_proto

schola.core.protocols.protobuf.deserialize.from_proto

from_proto

from_proto(msg)

Deserialize a protobuf message to Python objects.

This is a generic function that uses singledispatch to handle different protobuf message types. It converts protobuf messages from Unreal Engine into Python/Gymnasium-compatible objects like spaces, observations, and states.

Parameters

msg (Any) : The protobuf message to deserialize.

Returns

The deserialized Python object (e.g., gym.Space, np.ndarray, Dict, etc.).

Return type: Any

Notes

This function has multiple registered implementations for different protobuf message types. See the individual @from_proto.register implementations for specific type conversions.