Unverified Commit a907a903 authored by Xu Song's avatar Xu Song Committed by GitHub
Browse files

Change log level to warning for num_train_epochs override (#30014)

parent 1ed93be4
...@@ -564,8 +564,8 @@ class Trainer: ...@@ -564,8 +564,8 @@ class Trainer:
if not callable(self.data_collator) and callable(getattr(self.data_collator, "collate_batch", None)): if not callable(self.data_collator) and callable(getattr(self.data_collator, "collate_batch", None)):
raise ValueError("The `data_collator` should be a simple callable (function, class with `__call__`).") raise ValueError("The `data_collator` should be a simple callable (function, class with `__call__`).")
if args.max_steps > 0: if args.max_steps > 0 and args.num_train_epochs > 0:
logger.info("max_steps is given, it will override any value given in num_train_epochs") logger.warning("max_steps is given, it will override any value given in num_train_epochs")
if train_dataset is not None and not has_length(train_dataset) and args.max_steps <= 0: if train_dataset is not None and not has_length(train_dataset) and args.max_steps <= 0:
raise ValueError( raise ValueError(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment