class_docstr: Adam optimizer for fairseq.
  
  Important note: this optimizer corresponds to the "AdamW" variant of
  Adam in its weight decay behavior. As such, it is most closely
  analogous to torch.optim.AdamW from PyTorch.
class_docstr_tok: ["Adam","optimizer","for","fairseq",".","Important","note",":","this","optimizer","corresponds","to","the","``","AdamW","''","variant","of","Adam","in","its","weight","decay","behavior",".","As","such",",","it","is","most","closely","analogous","to","torch.optim.AdamW","from","PyTorch","."]
docstr: Return a kwarg dictionary that will be used to override optimizer
  args stored in checkpoints. This allows us to load a checkpoint and
  resume training using a different set of optimizer args, e.g., with a
  different learning rate.
docstr_tok: ["Return","a","kwarg","dictionary","that","will","be","used","to","override","optimizer","args","stored","in","checkpoints",".","This","allows","us","to","load","a","checkpoint","and","resume","training","using","a","different","set","of","optimizer","args",",","e.g.",",","with","a","different","learning","rate","."]
code: def optimizer_config(self):
      """
      Return a kwarg dictionary that will be used to override optimizer
      args stored in checkpoints. This allows us to load a checkpoint and
      resume training using a different set of optimizer args, e.g., with a
      different learning rate.
      """
      return {
          "lr": self.args.lr[0],
          "betas": eval(self.args.adam_betas),
          "eps": self.args.adam_eps,
          "weight_decay": self.args.weight_decay,
      }
  
imports: import logging
  import math
  from dataclasses import dataclass, field
  from typing import List
  import torch
  import torch.distributed
  import torch.optim
  from fairseq.dataclass import FairseqDataclass
  from fairseq.optim import FairseqOptimizer, register_optimizer
  from omegaconf import II
  from lightseq.training.ops.pytorch.adam import LSAdam
label_desc: Use image node_id 2 for calling the LSFSAdam obj's underlying member method code with example usage: obj.optimizer_config() and returns: dict