class_docstr: Distributed Node embedding optimizer using the Adagrad algorithm.
  
  This optimizer implements a distributed sparse version of Adagrad algorithm for
  optimizing :class:`dgl.distributed.DistEmbedding`. Being sparse means it only updates
  the embeddings whose gradients have updates, which are usually a very
  small portion of the total embeddings.
  
  Adagrad maintains a :math:`G_{t,i,j}` for every parameter in the embeddings, where
  :math:`G_{t,i,j}=G_{t-1,i,j} + g_{t,i,j}^2` and :math:`g_{t,i,j}` is the gradient of
  the dimension :math:`j` of embedding :math:`i` at step :math:`t`.
  
  NOTE: The support of sparse Adagrad optimizer is experimental.
  
  Parameters
  ----------
  params : list[dgl.distributed.DistEmbedding]
      The list of dgl.distributed.DistEmbedding.
  lr : float
      The learning rate.
  eps : float, Optional
      The term added to the denominator to improve numerical stability
      Default: 1e-10
code: def __init__(self, params, lr, eps=1e-10):
      super(SparseAdagrad, self).__init__(params, lr)
      self._eps = eps
      self._defaults = {"_lr": lr, "_eps": eps}
      # We need to register a state sum for each embedding in the kvstore.
      for emb in params:
          assert isinstance(
              emb, DistEmbedding
          ), "SparseAdagrad only supports dgl.distributed.DistEmbedding"
  
          name = emb.name + "_sum"
          state = DistTensor(
              (emb.num_embeddings, emb.embedding_dim),
              th.float32,
              name,
              init_func=initializer,
              part_policy=emb.part_policy,
              is_gdata=False,
          )
          assert (
              emb.name not in self._state
          ), "{} already registered in the optimizer".format(emb.name)
          self._state[emb.name] = state
  
imports: import abc
  import warnings
  from abc import abstractmethod
  from os.path import exists
  import torch
  import dgl
  from ....None import backend
  from ...dist_tensor import DistTensor
  from ...graph_partition_book import EDGE_PART_POLICY, NODE_PART_POLICY
  from ...nn.pytorch import DistEmbedding
  from .utils import alltoall, alltoallv
label_desc: Use image node_id 1 to create a new SparseAdagrad object from inherited base classes: DistSparseGradOptimizer with example: obj = SparseAdagrad(params, lr, eps)