recommend padding when using sample packing (#531)

This commit is contained in:
Wing Lian
2023-09-06 17:00:21 -04:00
committed by GitHub
parent 245c5c41e2
commit 343714972b
11 changed files with 28 additions and 0 deletions

View File

@@ -328,6 +328,20 @@ class ValidationTest(unittest.TestCase):
for record in self._caplog.records
)
cfg = DictDefault(
{
"sample_packing": True,
"pad_to_sequence_len": None,
}
)
with self._caplog.at_level(logging.WARNING):
validate_config(cfg)
assert any(
"`pad_to_sequence_len: true` is recommended when using sample_packing"
in record.message
for record in self._caplog.records
)
cfg = DictDefault(
{
"max_packed_sequence_len": 2048,