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
87ae2a46
Unverified
Commit
87ae2a46
authored
Jan 02, 2024
by
frankenliu
Committed by
GitHub
Jan 02, 2024
Browse files
fix bug:divide by zero in _maybe_log_save_evaluate() (#28251)
Co-authored-by:
liujizhong1
<
liujizhong1@xiaomi.com
>
parent
502a10a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/trainer.py
src/transformers/trainer.py
+1
-1
No files found.
src/transformers/trainer.py
View file @
87ae2a46
...
...
@@ -2238,7 +2238,7 @@ class Trainer:
)
def
_maybe_log_save_evaluate
(
self
,
tr_loss
,
model
,
trial
,
epoch
,
ignore_keys_for_eval
):
if
self
.
control
.
should_log
:
if
self
.
control
.
should_log
and
self
.
state
.
global_step
>
self
.
_globalstep_last_logged
:
if
is_torch_tpu_available
():
xm
.
mark_step
()
...
...
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