0b41742b42fe9c5da6c5ea8a8c07633b579dd461,parlai/utils/testing.py,,eval_model,#Any#Any#Any#Any#,294

Before Change


    
    import parlai.scripts.eval_model as ems

    parser = ems.setup_args()
    parser.set_params(**opt)
    parser.set_params(log_every_n_secs=10)
    popt = parser.parse_args([], print_args=False)

    if popt.get("model_file") and not popt.get("dict_file"):
        popt["dict_file"] = popt["model_file"] + ".dict"

After Change


    opt["datatype"] = "valid" if valid_datatype is None else valid_datatype
    valid = None if skip_valid else ems.EvalModel.main(**opt)
    opt["datatype"] = "test"
    test = None if skip_test else ems.EvalModel.main(**opt)

    return valid, test

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 0b41742b42fe9c5da6c5ea8a8c07633b579dd461
Time: 2020-06-16
Author: vedantpuri13@gmail.com
File Name: parlai/utils/testing.py
Class Name:
Method Name: eval_model


Project Name: facebookresearch/ParlAI
Commit Name: f809112cb39c230f0d9104c0d43bd261e2cd8cb3
Time: 2020-10-05
Author: dianaglzrico@gmail.com
File Name: tests/test_self_chat.py
Class Name: TestSelfChat
Method Name: test_convai2


Project Name: facebookresearch/ParlAI
Commit Name: 0b41742b42fe9c5da6c5ea8a8c07633b579dd461
Time: 2020-06-16
Author: vedantpuri13@gmail.com
File Name: parlai/utils/testing.py
Class Name:
Method Name: train_model


Project Name: facebookresearch/ParlAI
Commit Name: f809112cb39c230f0d9104c0d43bd261e2cd8cb3
Time: 2020-10-05
Author: dianaglzrico@gmail.com
File Name: tests/test_self_chat.py
Class Name: TestSelfChat
Method Name: test_vanilla