b7cec03dcd82807ed0c24212c98c7f4f7f6526d9,hypergan/cli.py,CLI,tpu_load,#CLI#Any#,306

Before Change



    def tpu_load(self, save_file):
        if "gs://" in save_file:
            if not tf.io.gfile.exists(save_file):
                return False
            temp_name = next(tempfile._get_candidate_names())
            temp_dir = tempfile._get_default_tempdir()
            temp_dir = temp_dir+"/"+temp_name
            tf.io.gfile.mkdir(temp_dir)

After Change


        if not tf.io.gfile.exists(save_file) and not tf.io.gfile.exists(save_file + ".index" ):
            return False
        if "gs://" in save_file:
            save_dir = "/".join(save_file.split("/")[0:-1])
            temp_name = next(tempfile._get_candidate_names())
            temp_dir = tempfile._get_default_tempdir()
            temp_dir = temp_dir+"/"+temp_name
            tf.io.gfile.mkdir(temp_dir)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: b7cec03dcd82807ed0c24212c98c7f4f7f6526d9
Time: 2019-09-11
Author: mikkel@255bits.com
File Name: hypergan/cli.py
Class Name: CLI
Method Name: tpu_load


Project Name: YerevaNN/mimic3-benchmarks
Commit Name: 7567cc646d258e40dde9790a28a9b264ccd494fb
Time: 2017-08-27
Author: harhro@gmail.com
File Name: mimic3models/split_train_val.py
Class Name:
Method Name:


Project Name: YerevaNN/mimic3-benchmarks
Commit Name: 5d353701dd56a1fc8abc15e4082e33b7bed2a241
Time: 2017-08-09
Author: harhro@gmail.com
File Name: mimic3models/split_train_val.py
Class Name:
Method Name: