Skip to content

Commit b83aaa4

Browse files
committed
flake8
1 parent c6bffa8 commit b83aaa4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pytorch_lightning/metrics/converters.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def numpy_metric(group: Optional[Any] = None,
196196
"""
197197

198198
def decorator_fn(func_to_decorate):
199-
return _apply_to_outputs(apply_to_collection, torch.Tensor, _sync_ddp,
199+
return _apply_to_outputs(apply_to_collection, torch.Tensor, _sync_ddp_if_available,
200200
group=group,
201201
reduce_op=reduce_op)(_numpy_metric_conversion(func_to_decorate))
202202

@@ -221,9 +221,8 @@ def tensor_metric(group: Optional[Any] = None,
221221
222222
"""
223223

224-
225224
def decorator_fn(func_to_decorate):
226-
return _apply_to_outputs(apply_to_collection, torch.Tensor, _sync_ddp,
225+
return _apply_to_outputs(apply_to_collection, torch.Tensor, _sync_ddp_if_available,
227226
group=group,
228227
reduce_op=reduce_op)(_tensor_metric_conversion(func_to_decorate))
229228

0 commit comments

Comments
 (0)