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
1cd2e21d
Unverified
Commit
1cd2e21d
authored
Apr 04, 2022
by
Andres Codas
Committed by
GitHub
Apr 04, 2022
Browse files
initialize the default rank set on TrainerState (#16530)
* initialize the default rank set on TrainerState * fix style
parent
6f9d8dc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/transformers/trainer.py
src/transformers/trainer.py
+5
-1
No files found.
src/transformers/trainer.py
View file @
1cd2e21d
...
...
@@ -488,7 +488,11 @@ class Trainer:
else
:
self
.
label_smoother
=
None
self
.
state
=
TrainerState
()
self
.
state
=
TrainerState
(
is_local_process_zero
=
self
.
is_local_process_zero
(),
is_world_process_zero
=
self
.
is_world_process_zero
(),
)
self
.
control
=
TrainerControl
()
# Internal variable to count flos in each process, will be accumulated in `self.state.total_flos` then
# returned to 0 every time flos need to be logged
...
...
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