0e09be2342c6e2ba2dcbdf872753700cada9e2fe,eval_pt.py,,parse_args,#,11

Before Change



    add_dataset_parser_arguments(parser)

    parser.add_argument(
        "--model",
        type=str,
        required=True,
        help="type of model to use. see model_provider for options.")
    parser.add_argument(
        "--use-pretrained",
        action="store_true",
        help="enable using pretrained model from github.")
    parser.add_argument(
        "--resume",
        type=str,
        default="",
        help="resume from previously saved parameters if not None")
    parser.add_argument(
        "--calc-flops",
        dest="calc_flops",
        action="store_true",
        help="calculate FLOPs")
    parser.add_argument(
        "--calc-flops-only",
        dest="calc_flops_only",
        action="store_true",
        help="calculate FLOPs without quality estimation")
    parser.add_argument(
        "--remove-module",
        action="store_true",
        help="enable if stored model has module")

    parser.add_argument(
        "--num-gpus",
        type=int,
        default=0,
        help="number of gpus to use.")
    parser.add_argument(
        "-j",
        "--num-data-workers",
        dest="num_workers",
        default=4,
        type=int,
        help="number of preprocessing workers")

    parser.add_argument(
        "--batch-size",
        type=int,
        default=32,
        help="training batch size per device (CPU/GPU).")

    parser.add_argument(
        "--save-dir",
        type=str,
        default="",
        help="directory of saved models and log-files")
    parser.add_argument(
        "--logging-file-name",
        type=str,
        default="train.log",
        help="filename of training log")

    parser.add_argument(
        "--log-packages",
        type=str,
        default="torch, torchvision",
        help="list of python packages for logging")
    parser.add_argument(
        "--log-pip-packages",
        type=str,
        default="",
        help="list of pip packages for logging")
    args = parser.parse_args()
    return args

After Change




def parse_args():
    parser = argparse.ArgumentParser(
        description="Evaluate a model for image classification (PyTorch/ImageNet-1K)",
        formatter_class=argparse.ArgumentDefaultsHelpFormatter)

    add_dataset_parser_arguments(parser)

    add_eval_cls_parser_arguments(parser)

    args = parser.parse_args()
    return args
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: osmr/imgclsmob
Commit Name: 0e09be2342c6e2ba2dcbdf872753700cada9e2fe
Time: 2019-05-07
Author: osemery@gmail.com
File Name: eval_pt.py
Class Name:
Method Name: parse_args


Project Name: osmr/imgclsmob
Commit Name: 018dbdad3c999d897abc565058bdf56a15bab5ca
Time: 2019-05-04
Author: osemery@gmail.com
File Name: eval_gl.py
Class Name:
Method Name: parse_args


Project Name: osmr/imgclsmob
Commit Name: 018dbdad3c999d897abc565058bdf56a15bab5ca
Time: 2019-05-04
Author: osemery@gmail.com
File Name: eval_gl_cifar.py
Class Name:
Method Name: parse_args


Project Name: osmr/imgclsmob
Commit Name: 0e09be2342c6e2ba2dcbdf872753700cada9e2fe
Time: 2019-05-07
Author: osemery@gmail.com
File Name: eval_pt.py
Class Name:
Method Name: parse_args