mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Mention why one needs to specify max_steps in Trainer (#22333)
* Mention why one needs to specify max_steps in Trainer * dummy change to trigger CI
This commit is contained in:
parent
5a9eb31477
commit
053c2153f8
@ -544,7 +544,10 @@ class Trainer:
|
||||
logger.info("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:
|
||||
raise ValueError("train_dataset does not implement __len__, max_steps has to be specified")
|
||||
raise ValueError(
|
||||
"The train_dataset does not implement __len__, max_steps has to be specified. "
|
||||
"The number of steps needs to be known in advance for the learning rate scheduler."
|
||||
)
|
||||
|
||||
if (
|
||||
train_dataset is not None
|
||||
|
Loading…
Reference in New Issue
Block a user