Skip to content

Commit

Permalink
Update sync_dist warning for multiple processes (#6790)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikb11 authored Apr 6, 2021
1 parent 7f6154f commit a17c027
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def run_epoch_func(self, results, opt_metric, func_name, *args, **kwargs) -> Non
warning_cache.warn(
f"The value associated to the key {non_metric_key}: {metric.cpu().tolist()} "
"doesn't appear to be the same accross all processes. "
"HINT: One could either do: `self.log(..., sync_dist=True, sync_fn=torch.mean)`"
" to force mean reduction across processes which can be inaccurate or implement"
"HINT: One could either do: `self.log(..., sync_dist=True)` to force mean"
" reduction by default across processes which can be inaccurate or implement"
" a `torchmetrics.Metric`"
)
warning_cache.warned_metrics.append(non_metric_key)
Expand Down

0 comments on commit a17c027

Please sign in to comment.