bff5f111e188c26eff86d94249d5bf603f35d5e9,parlai/tasks/insuranceqa/build.py,,build,#Any#,71

Before Change


        build_data.untar(dpath, fname)

        // According to the author, V2 holds the latest data
        dpext = os.path.join(dpath, "insuranceQA-master/V2")

        // read vocab file
        vocab_path = os.path.join(dpext, "vocabulary")
        d_vocab = read_vocab(vocab_path)

        // read label2answer file
        label2answer_path_gz = os.path.join(dpext, "InsuranceQA.label2answer.token.encoded.gz")
        d_label_answer = read_label2answer(label2answer_path_gz, d_vocab)

        // TODO: right now it uses 100 by default, but 500, 1000, 1500 (// of label candidates) should also be available
        train_path_gz = os.path.join(dpext, "InsuranceQA.question.anslabel.token.100.pool.solr.train.encoded.gz")
        valid_path_gz = os.path.join(dpext, "InsuranceQA.question.anslabel.token.100.pool.solr.valid.encoded.gz")
        test_path_gz = os.path.join(dpext, "InsuranceQA.question.anslabel.token.100.pool.solr.test.encoded.gz")

        create_fb_format(dpath, "train", train_path_gz, d_vocab, d_label_answer)

After Change


        build_data.download(url, dpath, fname)
        build_data.untar(dpath, fname)

        ParseInsuranceQAV1.build(dpath)
        ParseInsuranceQAV2.build(dpath)

        // Mark the data as built.
        build_data.mark_done(dpath, version_string=version)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: facebookresearch/ParlAI
Commit Name: bff5f111e188c26eff86d94249d5bf603f35d5e9
Time: 2017-07-13
Author: chao@wayblazer.com
File Name: parlai/tasks/insuranceqa/build.py
Class Name:
Method Name: build


Project Name: bokeh/bokeh
Commit Name: f1bc5b054e29f6d8e948fe7222936a2b0a975535
Time: 2019-10-07
Author: mattpap@gmail.com
File Name: bokeh/command/subcommands/build.py
Class Name: Build
Method Name: invoke


Project Name: pantsbuild/pants
Commit Name: 545a00c2bfc71bc08d453c8b4151413a63f8aa38
Time: 2018-10-28
Author: stuhood@twitter.com
File Name: tests/python/pants_test/backend/jvm/tasks/test_binary_create_integration.py
Class Name: BinaryCreateIntegrationTest
Method Name: test_deploy_excludes