ADD: warning if hub_model_id ist set but not any save strategy (#1202)

* warning if hub model id set but no save

* add warning

* move the warning

* add test

* allow more public methods for tests for now

* fix tests

---------

Co-authored-by: Wing Lian <wing.lian@gmail.com>
This commit is contained in:
JohanWork
2024-01-26 16:38:55 +01:00
committed by GitHub
parent 1b180034c7
commit af29d81f80
2 changed files with 22 additions and 0 deletions

View File

@@ -340,6 +340,11 @@ def validate_config(cfg):
"push_to_hub_model_id is deprecated. Please use hub_model_id instead."
)
if cfg.hub_model_id and not (cfg.save_steps or cfg.saves_per_epoch):
LOG.warning(
"hub_model_id is set without any models being saved. To save a model, set either save_steps or saves_per_epoch."
)
if cfg.gptq and cfg.model_revision:
raise ValueError(
"model_revision is not supported for GPTQ models. "