1ba2dd41729cb7254e9e40b036e3d516a05d7a28,tests/test_torch_agent.py,TestTorchAgent,test_batch_act,#TestTorchAgent#,718

Before Change


            {"text": "Hello there.",
             "labels": ["General Kenobi."]},
        ]
        obs_labs = [agent.vectorize(o) for o in obs_labs]
        reply = agent.batch_act(obs_labs)
        for i in range(len(obs_labs)):
            self.assertEqual(reply[i]["text"], f"Training {i}!")

After Change


        obs_labs_vecs = []
        for o in obs_labs:
            agent.history.clear()
            agent.history.update_history(o)
            obs_labs_vecs.append(agent.vectorize(o, agent.history))
        reply = agent.batch_act(obs_labs_vecs)
        for i in range(len(obs_labs_vecs)):
            self.assertEqual(reply[i]["text"], f"Training {i}!")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 1ba2dd41729cb7254e9e40b036e3d516a05d7a28
Time: 2019-02-13
Author: edinan@fb.com
File Name: tests/test_torch_agent.py
Class Name: TestTorchAgent
Method Name: test_batch_act


Project Name: facebookresearch/ParlAI
Commit Name: 1ba2dd41729cb7254e9e40b036e3d516a05d7a28
Time: 2019-02-13
Author: edinan@fb.com
File Name: tests/test_torch_agent.py
Class Name: TestTorchAgent
Method Name: test_vectorize


Project Name: facebookresearch/ParlAI
Commit Name: 1ba2dd41729cb7254e9e40b036e3d516a05d7a28
Time: 2019-02-13
Author: edinan@fb.com
File Name: tests/test_torch_agent.py
Class Name: TestTorchAgent
Method Name: test_batchify