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
10d72390
Commit
10d72390
authored
May 22, 2020
by
Lysandre
Browse files
Revert #4446 Since it introduces a new dependency
parent
e0db6bbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
src/transformers/trainer.py
src/transformers/trainer.py
+0
-4
No files found.
src/transformers/trainer.py
View file @
10d72390
...
...
@@ -11,7 +11,6 @@ from typing import Callable, Dict, List, Optional, Tuple
import
numpy
as
np
import
torch
from
packaging
import
version
from
torch
import
nn
from
torch.utils.data.dataloader
import
DataLoader
from
torch.utils.data.dataset
import
Dataset
...
...
@@ -495,11 +494,8 @@ class Trainer:
):
logs
:
Dict
[
str
,
float
]
=
{}
logs
[
"loss"
]
=
(
tr_loss
-
logging_loss
)
/
self
.
args
.
logging_steps
# backward compatibility for pytorch schedulers
logs
[
"learning_rate"
]
=
(
scheduler
.
get_last_lr
()[
0
]
if
version
.
parse
(
torch
.
__version__
)
>=
version
.
parse
(
"1.4"
)
else
scheduler
.
get_lr
()[
0
]
)
logging_loss
=
tr_loss
...
...
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