1ba2dd41729cb7254e9e40b036e3d516a05d7a28,tests/test_torch_agent.py,TestTorchAgent,test_batchify,#TestTorchAgent#,310
Before Change
self.assertEqual(list(batch.valid_indices), [1, 0, 2])
// now sort just on ys
new_vecs = [vecs.copy() for vecs in obs_vecs]
for vec in new_vecs:
vec.pop("text")
vec.pop("text_vec")
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"]},
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: flow-project/flow
Commit Name: 071b27b1ffc1c38e84f64fafcc126fafa54369a1
Time: 2017-07-05
Author: akreidieh@gmail.com
File Name: cistar-dev/cistar/core/base_env.py
Class Name: SumoEnvironment
Method Name: setup_initial_state
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