16a2c0070b0b3ce41dd0e53ecf47eda03ea65c2c,parlai/scripts/build_pytorch_data.py,,build_data,#Any#,50

Before Change


                    ex["preprocessed"] = True
                num_eps += 1
                num_exs += 1
                logger.log(num_exs, total_exs)
                ex_len = pytorch_data.write(json.dumps(make_serializable(ex)) + "\n")
                idx_to_char.append(cumulative_char_len)
                cumulative_char_len += ex_len
            // reset

After Change


            episode_done = False
            current.clear()
            context.clear()
    pbar.close()

    with open(os.path.join(datapath, "char_index"), "w") as char_index:
        json.dump(idx_to_char, char_index)
    with open(os.path.join(datapath, "data_length"), "w") as pytorch_data_len:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 16a2c0070b0b3ce41dd0e53ecf47eda03ea65c2c
Time: 2019-01-11
Author: roller@fb.com
File Name: parlai/scripts/build_pytorch_data.py
Class Name:
Method Name: build_data


Project Name: facebookresearch/ParlAI
Commit Name: 16a2c0070b0b3ce41dd0e53ecf47eda03ea65c2c
Time: 2019-01-11
Author: roller@fb.com
File Name: parlai/mturk/tasks/wizard_of_wikipedia/run.py
Class Name:
Method Name: setup_title_to_passage


Project Name: deepchem/deepchem
Commit Name: 1c07a01ae1268ca316981cf6be9a826e4691b5e4
Time: 2018-08-14
Author: peastman@stanford.edu
File Name: deepchem/feat/rdkit_grid_featurizer.py
Class Name: RdkitGridFeaturizer
Method Name: featurize_complexes