Skip to content

Commit

Permalink
fix: ddp bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JSabadin committed Dec 13, 2024
1 parent ec717aa commit 6445cbf
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,7 @@ def compute(self) -> tuple[Tensor, dict[str, Tensor]]:
)

map = metric_dict.pop("map")

# WARNING: fix DDP pl.log error
map = map.to(self.device)
metric_dict = {k: v.to(self.device) for k, v in metric_dict.items()}
return map, metric_dict

0 comments on commit 6445cbf

Please sign in to comment.