From bb5716f2fa813f4f96c2651d71871ad97bde37aa Mon Sep 17 00:00:00 2001 From: Stephen Roller Date: Fri, 19 Mar 2021 16:20:53 -0400 Subject: [PATCH] [ChunkTeacher] Test that would have caught broken padding --- tests/test_dynamicbatching.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_dynamicbatching.py b/tests/test_dynamicbatching.py index 2f768b0d422..2387cd4e705 100644 --- a/tests/test_dynamicbatching.py +++ b/tests/test_dynamicbatching.py @@ -132,6 +132,18 @@ def test_batchsize4(self): # intentionally an edgecase in the world self._test_correct_processed(NUM_TEST, batchsize=4) + def test_chunky(self): + """ + Test dynamic batching with chunk teachers end to end. + """ + self._test_correct_processed( + NUM_TEST, + model='test_agents/unigram', # important we use a real model here + task='integration_tests:chunky', + datatype='train:stream', + num_epochs=2, # important we use num epochs > 1 + ) + class TestBatchSort(unittest.TestCase): def _test_correct_processed(self, num_goal: int, **kwargs: Dict[str, Any]):