pytorch / torcheval

A library that contains a rich collection of performant PyTorch model metrics, a simple interface to create new metrics, a toolkit to facilitate metric computation in distributed training and tools for PyTorch model evaluations.
https://pytorch.org/torcheval
Other
211 stars 46 forks source link

use generator over list comprehension in synclib #179

Closed JKSenthil closed 1 year ago

JKSenthil commented 1 year ago

Summary: Fixes the warning [C419] Unnecessary list comprehension passed to any() prevents short-circuiting - rewrite as a generator. on line 224

Differential Revision: D48763832

facebook-github-bot commented 1 year ago

This pull request was exported from Phabricator. Differential Revision: D48763832

codecov[bot] commented 1 year ago

Codecov Report

Merging #179 (02e9adb) into main (1aaa7ff) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #179   +/-   ##
=======================================
  Coverage   95.70%   95.70%           
=======================================
  Files         176      176           
  Lines       10171    10171           
=======================================
  Hits         9734     9734           
  Misses        437      437           
Files Changed Coverage Δ
torcheval/metrics/synclib.py 95.74% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more