Skip to content

Commit

Permalink
Update trainer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeiteng authored Apr 19, 2023
1 parent 1cd9b8a commit 27c0667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion valle/bin/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def train_one_epoch(
elif params.dtype in ["float16", "fp16"]:
dtype, enabled = torch.float16, True

model_context = model.join isinstance(model, DDP) else nullcontext
model_context = model.join if isinstance(model, DDP) else nullcontext
with model_context():
batch_idx = 0
while True:
Expand Down

0 comments on commit 27c0667

Please sign in to comment.