class_docstr: Implements Row wise Adagrad algorithm. This is an extension of the Adagrad algorithm
  https://github.com/pytorch/pytorch/blob/master/torch/optim/adagrad.py, for use with
  EmbeddingBag parameters, where we want the adaptive learning rate to be the same within an
  embedding row. Since we only need to store state for an embedding row, rather than every single
  parameter, we can have drastic memory savings (factor of embedding_dim).
  
  Note that this implementation does not currently support sparse gradients.
  
  Args:
      params (iterable): iterable of parameters to optimize or dicts defining
          parameter groups
      lr (float, optional): learning rate (default: 1e-2)
      lr_decay (float, optional): learning rate decay (default: 0)
      weight_decay (float, optional): weight decay (L2 penalty) (default: 0)
      eps (float, optional): term added to the denominator to improve
          numerical stability (default: 1e-10)
      maximize (bool, optional): maximize the params based on the objective, instead of
          minimizing (default: False)
docstr: Performs a single optimization step.
  Args:
      closure (callable, optional): A closure that reevaluates the model
          and returns the loss.
code: def step(self, closure=None) -> torch.Tensor:
      """Performs a single optimization step.
      Args:
          closure (callable, optional): A closure that reevaluates the model
              and returns the loss.
      """
      loss = None
  
      if closure is not None:
          with torch.enable_grad():
              loss = closure()
  
      for group in self.param_groups:
          params_with_grad = []
          grads = []
          state_sums = []
          state_steps = []
  
          for p in group["params"]:
              if p.grad is not None:
                  params_with_grad.append(p)
                  grads.append(p.grad)
                  state = self.state[p]
                  state_sums.append(state["sum"])
                  state_steps.append(state["step"])
  
          adagrad(
              params_with_grad,
              grads,
              state_sums,
              state_steps,
              lr=group["lr"],
              weight_decay=group["weight_decay"],
              lr_decay=group["lr_decay"],
              eps=group["eps"],
              maximize=group["maximize"],
          )
  
      return loss
  
file_path: torchrec/torchrec/optim/rowwise_adagrad.py
imports: from typing import Any, Dict, Iterable, List
  import torch
  from torch import Tensor
  from torch.optim.optimizer import Optimizer
label_desc: Use image node_id 4 for calling the RowWiseAdagrad obj's underlying member method code with example usage: obj.step(closure) and returns: loss