Metrics `compute` result is being cached after `reset`
🐛 Bug
It looks like after calling pl.metrics.Metric.reset_state(), the previous value of pl.metrics.Metric.compute() is somehow cached afterwards:
To Reproduce
import torch
import numpy as np
import pytorch_lightning as pl

class AverageMeter(pl.metrics.Metric):
    def __init__(self):
        super().__init__()
        self.add_state("value", torch.zeros(1), dist_reduce_fx="sum")
        self.add_state("count", torch.zeros(1), dist_reduce_fx="sum")

    def update(self, value):
        if isinstance(value, torch.Tensor):
            self.value += value.sum()
            self.count += value.numel()
        else:
            self.value += value
            self.count += 1

    def compute(self):
        return (self.value / self.count).item()

m = AverageMeter()
m.update(1)
m.compute()   # This passes if I don't call this line

m.reset()
print(m.value, m.count)
assert np.isnan(m.compute())
This crashes with:
tensor([0.]) tensor([0.])
1.0
Traceback (most recent call last):
  File "scratch.py", line 29, in <module>
    assert np.isnan(m.compute())
AssertionError

This is very strange -- the values of value and count are reset appropriately to be (0, 0), but for some reason the compute value is 1.0.
If I comment out the m.compute() line, then this gives the expected behavior (of being nan).
Expected behavior
This script should run without problems
Environment
* CUDA:
	- GPU:
	- available:         False
	- version:           None
* Packages:
	- numpy:             1.19.5
	- pyTorch_debug:     False
	- pyTorch_version:   1.7.1
	- pytorch-lightning: 1.1.6
	- tqdm:              4.56.0
* System:
	- OS:                Linux
	- architecture:
		- 64bit
	- processor:         x86_64
	- python:            3.6.10
	- version:           #1 SMP Sun Jan 17 19:52:43 UTC 2021