PyTorch distributed mode send arbitrary data type

Is there an easy way to send arbitrary data type with the distributed mode? It looks like the current API only supports sending tensors.
In principle, I can serialize the data myself and stuff it into a ByteTensor, but that seems to incur a lot of overhead.

mpi4py can send arbitrary dict by invoking pickle under the hood. It’d be great if pytorch can support sending arbitrary data by pickle or protobuf as well. Or someone can let me know what’s the correct way to implement it. I might submit a pull request.