37f58cc580da8735ae5a259d4cb4ba0b8701e78e,tests/test_pytorch_data_teacher.py,TestPytorchDataTeacher,test_pyt_preprocess,#TestPytorchDataTeacher#,88

Before Change


                                    val1,
                                    val2)
                                )
        print("\n------Passed `test_pyt_preprocess`------\n")

    def test_valid_pyt_batchsort(self):
        
            Tests that batchsort *works* for two epochs; that is, that

After Change


                return act, agent
            return agent.observe(act), agent

        with testing_utils.capture_output() as _, testing_utils.tempdir() as tmpdir:
            defaults = parser_defaults.copy()
            defaults["batch_size"] = 1
            defaults["datatype"] = "train:stream:ordered"

            // Get processed act from agent
            defaults["model_file"] = os.path.join(tmpdir, "model")
            defaults["dict_file"] = os.path.join(tmpdir, "model.dict")
            agent_processed_observation, agent1 = get_teacher_act(defaults)

            // Get preprocessed act from teacher
            defaults["model_file"] = os.path.join(tmpdir, "model")
            defaults["dict_file"] = os.path.join(tmpdir, "model.dict")
            defaults["pytorch_preprocess"] = True
            teacher_processed_act, agent2 = get_teacher_act(defaults, teacher_processed=True)  // noqa: E501

        for key in agent_processed_observation:
            val1 = agent_processed_observation[key]
            val2 = teacher_processed_act[key]
            if isinstance(val1, torch.Tensor):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_pytorch_data_teacher.py
Class Name: TestPytorchDataTeacher
Method Name: test_pyt_preprocess


Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_pytorch_data_teacher.py
Class Name: TestPytorchDataTeacher
Method Name: test_valid_pyt_batchsort


Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_pytorch_data_teacher.py
Class Name: TestPytorchDataTeacher
Method Name: test_shuffle