76b5ecab61765a6fb83eb50f8d9c904548e925c5,fairseq/options.py,,parse_args_and_arch,#Any#Any#,64

Before Change



    // Add *-specific args to parser.
    CRITERION_REGISTRY[args.criterion].add_args(parser)
    OPTIMIZER_REGISTRY[args.optimizer].add_args(parser)
    LR_SCHEDULER_REGISTRY[args.lr_scheduler].add_args(parser)

    // Parse a second time.
    args = parser.parse_args(input_args)

After Change


    // Add *-specific args to parser.
    if hasattr(args, "criterion"):
        CRITERION_REGISTRY[args.criterion].add_args(parser)
    if hasattr(args, "optimizer"):
        OPTIMIZER_REGISTRY[args.optimizer].add_args(parser)
    if hasattr(args, "lr_scheduler"):
        LR_SCHEDULER_REGISTRY[args.lr_scheduler].add_args(parser)

    // Parse a second time.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pytorch/fairseq
Commit Name: 76b5ecab61765a6fb83eb50f8d9c904548e925c5
Time: 2018-06-15
Author: myleott@fb.com
File Name: fairseq/options.py
Class Name:
Method Name: parse_args_and_arch


Project Name: pytorch/fairseq
Commit Name: 5e82514d687289a73a6dec33b555217acd97cb0d
Time: 2020-10-02
Author: abaevski@fb.com
File Name: fairseq/options.py
Class Name:
Method Name: parse_args_and_arch