https://github.com/PyTorchLightning/pytorch-lightning/blob/8c07d8bf905e395bbd2142b5df7b185b8e936c41/pytorch_lightning/trainer/connectors/checkpoint_connector.py#L284
The reported error is:
File "/home/tiger/.local/lib/python3.7/site-packages/pytorch_lightning/trainer/connectors/checkpoint_connector.py", line 283, in restore_optimizers for k, v in state.items(): AttributeError: 'Tensor' object has no attribute 'items'
For MADGRAD, optimizer.state["k"] is tensor-type instead of mapping type. Therefore, we need to fix this problem for making Pytorch Lightning compatible with such kind of optimizers.
The correct way of fixing this issue is changing it to:

cc @awaelchli @ananthsub @ninginthecloud @rohitgr7