The error is raised in the torchmetrics module, which seems to rely on float32 being the default type.
If you want to keep setting the default type to float64 you might need to explicitly cast the tensors to the expected type before passing them to torchmetrics.