Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
a907a903
Unverified
Commit
a907a903
authored
Apr 08, 2024
by
Xu Song
Committed by
GitHub
Apr 08, 2024
Browse files
Change log level to warning for num_train_epochs override (#30014)
parent
1ed93be4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/trainer.py
src/transformers/trainer.py
+2
-2
No files found.
src/transformers/trainer.py
View file @
a907a903
...
...
@@ -564,8 +564,8 @@ class Trainer:
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__`)."
)
if
args
.
max_steps
>
0
:
logger
.
info
(
"max_steps is given, it will override any value given in num_train_epochs"
)
if
args
.
max_steps
>
0
and
args
.
num_train_epochs
>
0
:
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
:
raise
ValueError
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment