Error when importing metrics on Windows without DDP support
🐛 Bug
When loading the new metrics the following AttributeError is raised:
AttributeError: module 'torch.distributed' has no attribute 'ReduceOp'.
The problem is the use of torch.distributed.ReduceOp in the type hints and some functions of pytorch_lightning.metrics.converters.py.
A similar (identical?) issue was discussed on the NVIDIA/apex github. The issues seems to be due to the fact that Windows does not support certain distributed features, and as a result the ReduceOp class is completely missing in the Windows binaries. Their approach was to guard those imports with if torch.distributed.is_available().
To Reproduce
import pytorch_lightning.metrics
Expected behavior
Metrics should only raise an error if I try to use DDP on a machine without the necessary support.
Environment

CUDA:

GPU:

GeForce GTX 1050 Ti with Max-Q Design


available:         True
version:           10.2


Packages:

numpy:             1.18.4
pyTorch_debug:     False
pyTorch_version:   1.5.1
pytorch-lightning: 0.8.1
tensorboard:       2.2.1
tqdm:              4.46.0


System:

OS:                Windows
architecture:

64bit
WindowsPE


processor:         Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
python:            3.7.4
version:           10.0.17763