Update sync_dist warning for multiple processes (#6790)

This commit is contained in:
Kaushik B 2021-04-06 20:27:43 +05:30 committed by GitHub
parent 7f6154fcad
commit a17c027ea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -133,8 +133,8 @@ class HookResultStore:
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)