mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 11:11:05 +06:00
Fix: missing else branch to handle "--load_best_model_at_end" in training_args.py (#38217)
Update training_args.py
This commit is contained in:
parent
ae3e4e2d97
commit
d6c34cdcd0
@ -1646,10 +1646,11 @@ class TrainingArguments:
|
|||||||
"--load_best_model_at_end requires the saving steps to be a multiple of the evaluation "
|
"--load_best_model_at_end requires the saving steps to be a multiple of the evaluation "
|
||||||
f"steps, but found {self.save_steps}, which is not a multiple of {self.eval_steps}."
|
f"steps, but found {self.save_steps}, which is not a multiple of {self.eval_steps}."
|
||||||
)
|
)
|
||||||
raise ValueError(
|
else:
|
||||||
"--load_best_model_at_end requires the saving steps to be a round multiple of the evaluation "
|
raise ValueError(
|
||||||
f"steps, but found {self.save_steps}, which is not a round multiple of {self.eval_steps}."
|
"--load_best_model_at_end requires the saving steps to be a round multiple of the evaluation "
|
||||||
)
|
f"steps, but found {self.save_steps}, which is not a round multiple of {self.eval_steps}."
|
||||||
|
)
|
||||||
|
|
||||||
safetensors_available = is_safetensors_available()
|
safetensors_available = is_safetensors_available()
|
||||||
if self.save_safetensors and not safetensors_available:
|
if self.save_safetensors and not safetensors_available:
|
||||||
|
Loading…
Reference in New Issue
Block a user