Merge pull request #28 from thepycoder/bugfix/scalar_histogram_typo

Fix bug where custom buckets are not passed through correctly
This commit is contained in:
Allegro AI 2022-06-03 13:25:58 +03:00 committed by GitHub
commit 4c7d630895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,7 +323,7 @@ class StatisticsController(object):
metric_cls = self._metric_type_class.get(metric_.type)
if not metric_cls:
return None
if metric_cls in (Histogram, EnumHistogram):
if metric_cls in (ScalarHistogram, EnumHistogram):
return metric_cls(
name=name,
documentation="User defined metric {}".format(metric_.type),