Skip to content

Commit 7c475f1

Browse files
committed
fix(training): keep DDP static graph behavior unchanged
Remove the MLIP-wide static_graph option and override so DDP retains the default behavior from main. General training models may change parameter participation or control flow between iterations.
1 parent 3779c85 commit 7c475f1

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/fairchem/core/units/mlip_unit/mlip_unit.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,6 @@ def __init__(
514514
tf32: bool = False,
515515
ddp_broadcast_buffers: bool = False,
516516
ddp_gradient_as_bucket_view: bool = True,
517-
ddp_static_graph: bool = True,
518517
):
519518
super().__init__()
520519
self.job_config = job_config
@@ -572,15 +571,12 @@ def __init__(
572571
self.ema_model = None
573572
self.train_strategy = train_strategy
574573
if train_strategy == TrainStrategy.DDP:
575-
# UMA's graph and buffers are stable, so DDP need not inspect or
576-
# broadcast them on every step.
577574
self.model = prepare_module(
578575
model,
579576
device=torch.device(get_device_for_local_rank()),
580577
strategy=DDPStrategy(
581578
broadcast_buffers=ddp_broadcast_buffers,
582579
gradient_as_bucket_view=ddp_gradient_as_bucket_view,
583-
static_graph=ddp_static_graph,
584580
),
585581
)
586582
if self.ema_decay is not None:

0 commit comments

Comments
 (0)