Unverified Commit 1cd2e21d authored by Andres Codas's avatar Andres Codas Committed by GitHub
Browse files

initialize the default rank set on TrainerState (#16530)

* initialize the default rank set on TrainerState

* fix style
parent 6f9d8dc1
...@@ -488,7 +488,11 @@ class Trainer: ...@@ -488,7 +488,11 @@ class Trainer:
else: else:
self.label_smoother = None 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() self.control = TrainerControl()
# Internal variable to count flos in each process, will be accumulated in `self.state.total_flos` then # 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 # returned to 0 every time flos need to be logged
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment