d000d0750c958e2ec1b3d9eb3c9ea9cf63ab14f0,magpie/main.py,MagpieModel,train,#MagpieModel#Any#Any#Any#Any#Any#Any#Any#Any#Any#,38

Before Change



        if not self.word2vec_model:
            print("word2vec model is not trained. Run train_word2vec() first.")
            return

        if not self.scaler:
            print("The scaler is not trained. Run fit_scaler() first.")
            return

After Change


            raise RuntimeError("The scaler is not trained. " + \
                               "Run fit_scaler() first.")

        if not os.path.isdir(train_dir):
            raise ValueError("The training directory " + train_dir + \
                             " does not exist")

        if test_dir and not os.path.isdir(test_dir):
            raise ValueError("The test directory " + test_dir + \
                             " does not exist")

        if self.keras_model:
            print("WARNING! Overwriting already trained Keras model.",
                  file=sys.stderr)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: inspirehep/magpie
Commit Name: d000d0750c958e2ec1b3d9eb3c9ea9cf63ab14f0
Time: 2017-07-07
Author: stypka@spotify.com
File Name: magpie/main.py
Class Name: MagpieModel
Method Name: train


Project Name: inspirehep/magpie
Commit Name: d000d0750c958e2ec1b3d9eb3c9ea9cf63ab14f0
Time: 2017-07-07
Author: stypka@spotify.com
File Name: magpie/main.py
Class Name: MagpieModel
Method Name: batch_train


Project Name: inspirehep/magpie
Commit Name: d000d0750c958e2ec1b3d9eb3c9ea9cf63ab14f0
Time: 2017-07-07
Author: stypka@spotify.com
File Name: magpie/main.py
Class Name: MagpieModel
Method Name: train


Project Name: mlflow/mlflow
Commit Name: 39d47fa6351c7a39a2af3904819d3edcc394aff3
Time: 2019-12-18
Author: 33237569+tomasatdatabricks@users.noreply.github.com
File Name: mlflow/store/artifact/artifact_repo.py
Class Name: ArtifactRepository
Method Name: download_artifacts