From a992e6b34d77138a83a05cacc87da80a7ae09650 Mon Sep 17 00:00:00 2001 From: Diego Rodriguez Date: Wed, 14 Oct 2020 15:48:48 -0300 Subject: [PATCH] added extra metrics with apf 1.0.1 --- requirements.txt | 2 +- settings.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index beb4105..8115fcc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ numpy Cython matplotlib GPy -apf-base==1.0.0 +apf-base==1.0.1 -e git+https://github.com/alercebroker/mhps.git#egg=mhps -e git+https://github.com/alercebroker/db-plugins.git#egg=db-plugins -e git+https://github.com/alercebroker/late_classifier.git#egg=late-classifier diff --git a/settings.py b/settings.py index a1a1927..1871de6 100644 --- a/settings.py +++ b/settings.py @@ -262,6 +262,12 @@ METRICS_CONFIG = { "CLASS": "apf.metrics.KafkaMetricsProducer", + "EXTRA_METRICS": [ + {"key": "candid", "format": lambda x: str(x)}, + "oid", + {"key": "detections", "format": lambda x: len(x), "alias": "n_det"}, + {"key": "non_detections", "format": lambda x: len(x), "alias": "n_non_det"} + ], "PARAMS": { "PARAMS": { "bootstrap.servers": os.environ["METRICS_HOST"],