communication.serializer_plugins.torch module¶
(De)serialization logic for pytorch objects.
- communication.serializer_plugins.torch.register()[source]¶
Register pytorch serializer and deserializer.
- Return type:
None
- communication.serializer_plugins.torch.torch_deserialize_tensor(obj, **_kwargs)[source]¶
Function for deserializing pytorch tensors and loading them into cpu
- Parameters:
obj (
dict[str,Any] |bytes) – pytorch tensor to deserialize**_kwargs (
Any) – optional extra keyword arguments
- Return type:
Tensor- Returns:
deserialized tensor