4a7ef809f160069359ad97114c6a4820ef4dfa0f,src/main.py,,main,#Any#,40

Before Change


        try:
            assert len(macro_best) > 0
        except AssertionError:
            log.error("No best checkpoint found to evaluate.")
            return 0
        try:
            assert len(macro_best) == 1
        except AssertionError:

After Change


        macro_best = glob.glob(os.path.join(args.run_dir,
                                            "model_state_main_epoch_*.best_macro.th"))
        assert_for_log(len(macro_best) > 0, "No best checkpoint found to evaluate.")
        assert_for_log(len(macro_best) == 1, "Too many best checkpoints. Something is wrong.")
        load_model_state(model, macro_best[0], args.cuda)

    // Train just the task-specific components for eval tasks.
    if args.train_for_eval:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: jsalt18-sentence-repl/jiant
Commit Name: 4a7ef809f160069359ad97114c6a4820ef4dfa0f
Time: 2018-06-27
Author: sbowman@stanford.edu
File Name: src/main.py
Class Name:
Method Name: main


Project Name: ray-project/ray
Commit Name: 8cf598deab3158239e96ae193d1e42315ecb007e
Time: 2020-04-27
Author: nflu@users.noreply.github.com
File Name: python/ray/util/sgd/torch/distributed_torch_runner.py
Class Name: LocalDistributedRunner
Method Name: __init__


Project Name: tensorflow/transform
Commit Name: 0c0843bbe1d2e4edb95b7d7b50c9b73a7817bbea
Time: 2020-07-29
Author: iindyk@google.com
File Name: tensorflow_transform/beam/impl.py
Class Name:
Method Name: _replace_tensors_with_constant_values