Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
[ChunkTeacher] Test that would have caught broken padding (#3543)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenroller committed Mar 19, 2021
1 parent 6bc04cc commit 6e5218f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_dynamicbatching.py
Expand Up @@ -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]):
Expand Down

0 comments on commit 6e5218f

Please sign in to comment.