Skip to content

Commit

Permalink
Set to zero, not None
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerzr committed Sep 12, 2023
1 parent 535ad35 commit 60ea398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/accelerate/accelerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,7 @@ def check_trigger(self):
self.flag_tensor = torch.tensor(0, device=self.device)
flag_tensor = self.reduce(self.flag_tensor)
if flag_tensor.item() >= 1:
self.flag_tensor = None
self.flag_tensor = torch.tensor(0, device=self.device)
return True
return False

Expand Down

0 comments on commit 60ea398

Please sign in to comment.