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
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "b92d68421dee75c3a078b26b78a05bd59007d855"
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
Hide 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:
...
@@ -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
(
...
...
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