You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Metrics without labels missing breaks some codepath #949
Activity
romuald commentedon Aug 2, 2023
I've tried to add a
_lock: contextlib.contextmanager = contextlib.nullcontext()inMetricWrapperBaseThis fixes the problem, but the
.clear()does not do anything anyway (it simply creates a_metrics = {}on the object, the values are kept)Not sure how to properly fix this, or if this is even desirable
roidelapluie commentedon Aug 8, 2023
clear()is indeed not intended for metrics without labels.You could use e.g.
.set(-1)if your testsfix: raise ValueError when clear() called on metric without labels (p…