drytorch.contrib.torcheval

Support for torcheval syncing recommended for distributed training.

Functions

from_torcheval(torch_eval)

Returns a wrapper of a Metric from torcheval with a sync method.

from_torcheval(torch_eval: Metric[Tensor | dict[str, Tensor]]) ObjectiveProtocol[Tensor, Tensor][source]

Returns a wrapper of a Metric from torcheval with a sync method.

Parameters:

torch_eval (Metric[Tensor | dict[str, Tensor]])

Return type:

ObjectiveProtocol[Tensor, Tensor]