75f217a2876265ade70929edd98ecbe2242d253b,visdialch/utils/checkpointing.py,,load_checkpoint,#,127

Before Change


    checkpoint_commit_sha = list(checkpoint_dirpath.glob(".commit-*"))

    if len(checkpoint_commit_sha) == 0:
        raise UserWarning(
            "Commit SHA was not recorded while saving checkpoints."
        )
    else:
        // verify commit sha, raise warning if it doesn"t match
        commit_sha_subprocess = Popen(
            ["git", "rev-parse", "--short", "HEAD"], stdout=PIPE, stderr=PIPE

After Change


    checkpoint_commit_sha = list(checkpoint_dirpath.glob(".commit-*"))

    if len(checkpoint_commit_sha) == 0:
        warnings.warn(
            "Commit SHA was not recorded while saving checkpoints."
        )
    else:
        // verify commit sha, raise warning if it doesn"t match
        commit_sha_subprocess = Popen(
            ["git", "rev-parse", "--short", "HEAD"], stdout=PIPE, stderr=PIPE
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: 75f217a2876265ade70929edd98ecbe2242d253b
Time: 2019-05-27
Author: ysh.kant@gmail.com
File Name: visdialch/utils/checkpointing.py
Class Name:
Method Name: load_checkpoint


Project Name: soft-matter/trackpy
Commit Name: dea960c4511a5d1339c3359ad15b0ced68bbe21b
Time: 2014-02-12
Author: nkeim@seas.upenn.edu
File Name: trackpy/predict.py
Class Name: NearestVelocityPredict
Method Name: observe


Project Name: soft-matter/trackpy
Commit Name: dea960c4511a5d1339c3359ad15b0ced68bbe21b
Time: 2014-02-12
Author: nkeim@seas.upenn.edu
File Name: trackpy/predict.py
Class Name: NullPredict
Method Name: link_df_iter