Merge pull request #258 from NanoCode012/fix/deprecate-push
Browse files- README.md +1 -1
- src/axolotl/utils/trainer.py +2 -2
- src/axolotl/utils/validation.py +5 -0
README.md
CHANGED
@@ -341,7 +341,7 @@ dataset_prepared_path: data/last_run_prepared
|
|
341 |
# push prepared dataset to hub
|
342 |
push_dataset_to_hub: # repo path
|
343 |
# push checkpoints to hub
|
344 |
-
|
345 |
# whether to use hf `use_auth_token` for loading datasets. Useful for fetching private datasets
|
346 |
# required to be true when used in combination with `push_dataset_to_hub`
|
347 |
hf_use_auth_token: # boolean
|
|
|
341 |
# push prepared dataset to hub
|
342 |
push_dataset_to_hub: # repo path
|
343 |
# push checkpoints to hub
|
344 |
+
hub_model_id: # repo path
|
345 |
# whether to use hf `use_auth_token` for loading datasets. Useful for fetching private datasets
|
346 |
# required to be true when used in combination with `push_dataset_to_hub`
|
347 |
hf_use_auth_token: # boolean
|
src/axolotl/utils/trainer.py
CHANGED
@@ -124,8 +124,8 @@ def setup_trainer(cfg, train_dataset, eval_dataset, model, tokenizer):
|
|
124 |
if cfg.max_grad_norm:
|
125 |
training_arguments_kwargs["max_grad_norm"] = cfg.max_grad_norm
|
126 |
|
127 |
-
if cfg.
|
128 |
-
training_arguments_kwargs["
|
129 |
training_arguments_kwargs["push_to_hub"] = True
|
130 |
|
131 |
training_args = transformers.TrainingArguments(
|
|
|
124 |
if cfg.max_grad_norm:
|
125 |
training_arguments_kwargs["max_grad_norm"] = cfg.max_grad_norm
|
126 |
|
127 |
+
if cfg.hub_model_id:
|
128 |
+
training_arguments_kwargs["hub_model_id"] = cfg.hub_model_id
|
129 |
training_arguments_kwargs["push_to_hub"] = True
|
130 |
|
131 |
training_args = transformers.TrainingArguments(
|
src/axolotl/utils/validation.py
CHANGED
@@ -92,6 +92,11 @@ def validate_config(cfg):
|
|
92 |
):
|
93 |
logging.warning("adamw hyperparameters found, but no adamw optimizer set")
|
94 |
|
|
|
|
|
|
|
|
|
|
|
95 |
# TODO
|
96 |
# MPT 7b
|
97 |
# https://github.com/facebookresearch/bitsandbytes/issues/25
|
|
|
92 |
):
|
93 |
logging.warning("adamw hyperparameters found, but no adamw optimizer set")
|
94 |
|
95 |
+
if cfg.push_to_hub_model_id:
|
96 |
+
raise ValueError(
|
97 |
+
"push_to_hub_model_id is deprecated. Please use hub_model_id instead."
|
98 |
+
)
|
99 |
+
|
100 |
# TODO
|
101 |
# MPT 7b
|
102 |
# https://github.com/facebookresearch/bitsandbytes/issues/25
|