ensure explicit eval_sample_packing to avoid mismatch issues (#1692)
Browse files
src/axolotl/utils/config/models/input/v0_4_1/__init__.py
CHANGED
|
@@ -899,6 +899,15 @@ class AxolotlInputConfig(
|
|
| 899 |
raise ValueError(
|
| 900 |
"eval_table_size and eval_sample_packing are not supported together with sample_packing. Please set 'eval_sample_packing' to false."
|
| 901 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 902 |
return data
|
| 903 |
|
| 904 |
@model_validator(mode="before")
|
|
|
|
| 899 |
raise ValueError(
|
| 900 |
"eval_table_size and eval_sample_packing are not supported together with sample_packing. Please set 'eval_sample_packing' to false."
|
| 901 |
)
|
| 902 |
+
if (
|
| 903 |
+
data.get("sample_packing")
|
| 904 |
+
and data.get("eval_sample_packing") is None
|
| 905 |
+
and not data.get("eval_table_size")
|
| 906 |
+
):
|
| 907 |
+
LOG.info(
|
| 908 |
+
"explicitly setting `eval_sample_packing` to match `sample_packing`"
|
| 909 |
+
)
|
| 910 |
+
data["eval_sample_packing"] = True
|
| 911 |
return data
|
| 912 |
|
| 913 |
@model_validator(mode="before")
|