type object got multiple values for keyword argument 'loss'
🐛 Bug
The error appears when TrainReport has minimize param set and loss log added at the same time with prog_bar=True
Code sample
def training_step(self, batch, batch_idx):
        loss = self(batch)
        result = pl.TrainResult(minimize=loss)
        result.log("loss", loss, prog_bar=True)

        return result

Where the problem is
I followed the code and it comes to the problem with the ProgressBar callback inside progress.py line 339 -> trainer.py line 884 (return dict(**ref_model.get_progress_bar_dict(), **self.progress_bar_metrics)) which returns
ref_model.get_progress_bar_dict()
Out[4]: {'loss': '0.692', 'v_num': 9}
self.progress_bar_metrics
Out[5]: {'loss': 0.6924866437911987}

Expected behavior
Not sure. At least the error message should be a bit clearer since a user does not create two loss logs but just one.
Environment

CUDA:

GPU:
available:         False
version:           None


Packages:

numpy:             1.19.1
pyTorch_debug:     False
pyTorch_version:   1.6.0
pytorch-lightning: 0.9.0
tqdm:              4.49.0


System:

OS:                Windows
architecture:

64bit
WindowsPE


processor:         Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
python:            3.8.5
version:           10.0.18362