code: def log_learning_rates(self,
                             model: Model,
                             optimizer: torch.optim.Optimizer):
          
          if self._should_log_learning_rate:
              # optimizer stores lr info keyed by parameter tensor
              # we want to log with parameter name
              names = {param: name for name, param in model.named_parameters()}
              for group in optimizer.param_groups:
                  if 'lr' not in group:
                      continue
                  rate = group['lr']
                  for param in group['params']:
                      # check whether params has requires grad or not
                      effective_rate = rate * float(param.requires_grad)
                      self.add_train_scalar("learning_rate/" + names[param], effective_rate)
docs: Send current parameter specific learning rates to tensorboard