5e82514d687289a73a6dec33b555217acd97cb0d,fairseq/options.py,,add_optimization_args,#Any#,468
Before Change
def add_optimization_args(parser):
group = parser.add_argument_group("Optimization")
// fmt: off
group.add_argument("--max-epoch", "--me", default=0, type=int, metavar="N",
help="force stop training at specified epoch")
group.add_argument("--max-update", "--mu", default=0, type=int, metavar="N",
help="force stop training at specified update")
group.add_argument("--stop-time-hours", default=0, type=float, metavar="N",
help="force stop training after specified cumulative time (if >0)")
group.add_argument("--clip-norm", default=0.0, type=float, metavar="NORM",
help="clip threshold of gradients")
After Change
def add_optimization_args(parser):
group = parser.add_argument_group("optimization")
// fmt: off
gen_parser_from_dataclass(group, OptimizationParams())
// fmt: on
return group
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: pytorch/fairseq
Commit Name: 5e82514d687289a73a6dec33b555217acd97cb0d
Time: 2020-10-02
Author: abaevski@fb.com
File Name: fairseq/options.py
Class Name:
Method Name: add_optimization_args
Project Name: pytorch/fairseq
Commit Name: 94a1b924f3adec25c8c508ac112410d02b400d1e
Time: 2020-09-26
Author: abaevski@fb.com
File Name: fairseq/optim/nag.py
Class Name: FairseqNAG
Method Name: add_args
Project Name: pytorch/fairseq
Commit Name: 5e82514d687289a73a6dec33b555217acd97cb0d
Time: 2020-10-02
Author: abaevski@fb.com
File Name: fairseq/options.py
Class Name:
Method Name: add_optimization_args
Project Name: pytorch/fairseq
Commit Name: 94a1b924f3adec25c8c508ac112410d02b400d1e
Time: 2020-09-26
Author: abaevski@fb.com
File Name: fairseq/optim/adam.py
Class Name: FairseqAdam
Method Name: add_args