Skip to content

Commit 3415855

Browse files
committed
every machine keep track of ema if using switch ema
1 parent 39d282f commit 3415855

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

alphafold3_pytorch/trainer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,14 @@ def __init__(
209209
self.distributed_eval = distributed_eval
210210
self.will_eval_or_test = self.is_main or distributed_eval
211211

212+
# using "switch" ema
213+
214+
self.switch_ema = exists(ema_update_model_with_ema_every)
215+
212216
# exponential moving average
213217

214218
self.ema_model = None
215-
self.has_ema = self.will_eval_or_test and use_ema
219+
self.has_ema = (self.will_eval_or_test or self.switch_ema) and use_ema
216220

217221
if self.has_ema:
218222
self.ema_model = EMA(

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "alphafold3-pytorch"
3-
version = "0.6.3"
3+
version = "0.6.4"
44
description = "Alphafold 3 - Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "[email protected]" },

0 commit comments

Comments
 (0)