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

[ChunkTeacher] Test that would have caught broken padding #3543

Merged
merged 1 commit into from Mar 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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