Skip to content

Commit 2bddd8c

Browse files
committed
reset compiler after feature extractor freeze
1 parent b407fb7 commit 2bddd8c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/spidr/train.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ def wrap_ddp() -> DistributedDataParallel:
132132
scheduler.step()
133133
step += 1
134134
ema_decay = model.update_ema(step)
135+
if step == cfg.model.freeze_step and cfg.run.compile:
136+
torch.compiler.reset()
135137
if step == cfg.model.freeze_step and len(optimizer.param_groups) > 1:
136138
remove_param_group(optimizer, scheduler, 1)
137139
ddp_model = wrap_ddp() # So DDP stops expecting gradients for feature extractor

0 commit comments

Comments
 (0)