make pad_to_sequence_len default to the same value as sample_packing (#2941) [skip ci]
* 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>
This commit is contained in:
21
tests/utils/schemas/validation/test_default_values.py
Normal file
21
tests/utils/schemas/validation/test_default_values.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user