* make pad_to_sequence_len default to the same value as sample_packing * remove duplicate validation * fix test * update description meta Co-authored-by: NanoCode012 <nano@axolotl.ai> --------- Co-authored-by: NanoCode012 <nano@axolotl.ai>
22 lines
585 B
Python
22 lines
585 B
Python
"""Tests for default values for configurations"""
|
|
|
|
from axolotl.utils.config import validate_config
|
|
from axolotl.utils.dict import DictDefault
|
|
|
|
|
|
class TestDefaultConfigValues:
|
|
"""Tests for default values for configurations"""
|
|
|
|
def test_pad_to_sequence_len(self, min_base_cfg):
|
|
"""Tests that sample packing automatically sets pad_to_sequence_len to True"""
|
|
cfg = (
|
|
DictDefault(
|
|
sample_packing=True,
|
|
)
|
|
| min_base_cfg
|
|
)
|
|
|
|
cfg = validate_config(cfg)
|
|
|
|
assert cfg.pad_to_sequence_len is True
|