1ba2dd41729cb7254e9e40b036e3d516a05d7a28,tests/test_torch_agent.py,TestTorchAgent,test_batchify,#TestTorchAgent#,310

Before Change


            self.assertIsNone(batch.candidates)
            self.assertIsNone(batch.candidate_vecs)
            self.assertIsNone(batch.image)
            self.assertIsNone(batch.memory_vecs)

            obs_vecs = [agent.vectorize(o, add_start=False, add_end=False)
                        for o in obs_batch]

After Change


            self.assertEqual(batch.labels, obs_batch[2][lab_key])
            self.assertEqual(list(batch.valid_indices), [2])

        agent.history.clear()
        obs_cands = [
            agent.vectorize({"label_candidates": ["A", "B", "C"]},
                            agent.history),
            agent.vectorize({"label_candidates": ["1", "2", "5", "3", "Sir"]},
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

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_batchify


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: streamlit/streamlit
Commit Name: 8111f82cf188db2332cc0b932033ed27e599051c
Time: 2019-05-11
Author: thiagot@gmail.com
File Name: lib/tests/streamlit/add_rows_test.py
Class Name: DeltaGeneratorAddRowsTest
Method Name: test_add_rows_fails_when_wrong_name


Project Name: streamlit/streamlit
Commit Name: 8111f82cf188db2332cc0b932033ed27e599051c
Time: 2019-05-11
Author: thiagot@gmail.com
File Name: lib/tests/streamlit/add_rows_test.py
Class Name: DeltaGeneratorAddRowsTest
Method Name: test_add_rows_fails_when_wrong_shape