def add_args(parser):
        """Add optimizer-specific arguments to the parser."""
        # fmt: off
        parser.add_argument('--weight-decay', '--wd', default=0.0, type=float, metavar='WD',
                            help='weight decay')
        parser.add_argument('--adagrad-clip', default=0.0, type=float, metavar='D',
                            help='internal grad clip')
        # fmt: on
Add optimizer-specific arguments to the parser.
understand_icl/fairseq/examples/adaptive_span/adagrad_with_grad_clip.py