code: def adagrad(
      params: List[Tensor],
      grads: List[Tensor],
      state_sums: List[Tensor],
      state_steps: List[Tensor],
      # kwonly args with defaults are not supported by functions compiled with torchscript issue #70627
      # setting these as kwargs for now as functional API is compiled by torch/distributed/optim
      *,
      lr: float,
      weight_decay: float,
      lr_decay: float,
      eps: float,
      maximize: bool,
  ) -> None:
      r"""Functional API that performs Adagrad algorithm computation.
      See :class:`~torch.optim.Adagrad` for details.
      """
  
      if not all([isinstance(t, torch.Tensor) for t in state_steps]):
          raise RuntimeError(
              "API has changed, `state_steps` argument must contain a list of singleton tensors"
          )
  
      _single_tensor_adagrad(
          params,
          grads,
          state_sums,
          state_steps,
          lr=lr,
          weight_decay=weight_decay,
          lr_decay=lr_decay,
          eps=eps,
          maximize=maximize,
      )
  
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 1 for calling a global function with example usage: adagrad(params, grads, state_sums, state_steps) without return types