def add_args(parser):
        """Add arguments to the parser for this LR scheduler."""
        # fmt: off
        parser.add_argument('--lr-shrink', default=0.1, type=float, metavar='LS',
                            help='shrink factor for annealing, lr_new = (lr * lr_shrink)')
        parser.add_argument('--lr-threshold', default=1e-4, type=float, metavar='LT',
                            help='Threshold for measuring the new optimum, \
                            to only focus on significant changes')
        parser.add_argument('--warmup-updates', default=0, type=int, metavar='N',
                            help='warmup the learning rate linearly for the first N updates')
        parser.add_argument('--warmup-init-lr', default=-1, type=float, metavar='LR',
                            help='initial learning rate during warmup phase; default is args.lr')
        # fmt: on
Add arguments to the parser for this LR scheduler.
infoxlm/fairseq/fairseq/optim/lr_scheduler/reduce_lr_on_plateau.py