a48b63448b0164263bcd9bcaeead6bdd91ff6072,test/data/test_functional.py,TestFunctional,test_generate_sp_model,#TestFunctional#,22

Before Change



        self.assertEqual(len(sp_user), 23456)

        if os.path.isfile("spm_user.model"):
            os.remove("spm_user.model")
        if os.path.isfile("spm_user.vocab"):
            os.remove("spm_user.vocab")

    def test_sentencepiece_numericalizer(self):

After Change


        // 2. when fb infra performs stress tests, multiple instances of this test run.
        //    The name of the generated models have to be unique and they need to be cleaned up.
        with tempfile.TemporaryDirectory() as dir_name:
            data_path = os.path.join(dir_name, asset_name)
            shutil.copy(asset_path, data_path)

            model_prefix = os.path.join(dir_name, f"spm_user_{uuid.uuid4()}")
            model_file = f"{model_prefix}.model"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: pytorch/text
Commit Name: a48b63448b0164263bcd9bcaeead6bdd91ff6072
Time: 2020-05-28
Author: 855818+mthrok@users.noreply.github.com
File Name: test/data/test_functional.py
Class Name: TestFunctional
Method Name: test_generate_sp_model


Project Name: mozilla/TTS
Commit Name: 278c7a91b77448236af73d6942da425a5d5a2e34
Time: 2019-04-28
Author: egolge@mozilla.com
File Name: datasets/preprocess.py
Class Name:
Method Name: mozilla


Project Name: vatlab/SoS
Commit Name: 0e7f654620f39a50b4a9c47481ea41bc88e18186
Time: 2017-04-08
Author: ben.bog@gmail.com
File Name: sos/hosts.py
Class Name: RemoteHost
Method Name: receive_result


Project Name: tensorlayer/tensorlayer
Commit Name: 1ab2f1d30208a972fbb331da35de4f899580ea5d
Time: 2018-06-01
Author: contact@jonathandekhtiar.eu
File Name: example/tutorial_vgg16.py
Class Name:
Method Name:


Project Name: pytorch/text
Commit Name: 038515ccfb6df094e22b9f14fcf9d8c391bc4eaa
Time: 2019-07-26
Author: cpuhrsch@fb.com
File Name: torchtext/utils.py
Class Name:
Method Name: extract_archive