From 4c6371d5e6cdfa5b5e2b4d19fd54c2bb0e568ee5 Mon Sep 17 00:00:00 2001 From: Jaeyeon Kim Date: Fri, 8 Oct 2021 18:19:27 +0900 Subject: [PATCH 1/2] [enhance] change default metrics collect format - to parse scientific notation well --- pkg/metricscollector/v1beta1/common/const.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/metricscollector/v1beta1/common/const.go b/pkg/metricscollector/v1beta1/common/const.go index b7ac0948e8d..99111d4e6b7 100644 --- a/pkg/metricscollector/v1beta1/common/const.go +++ b/pkg/metricscollector/v1beta1/common/const.go @@ -40,7 +40,10 @@ const ( // Metrics must be printed this way // loss=0.3 // accuracy=0.98 - DefaultFilter = `([\w|-]+)\s*=\s*((-?\d+)(\.\d+)?)` + // Score=-7.53e-05 + // Score=1E0 + // Score=1.23E10 + DefaultFilter = `([\w|-]+)\s*=\s*([+-]?\d(\.\d+)?([Ee][+-]?\d+)?)` // TODO (andreyvelich): Do we need to maintain 2 names? Should we leave only 1? MetricCollectorContainerName = "metrics-collector" From 962116a135fbcf41e246d2ae42c9155312f5f6d1 Mon Sep 17 00:00:00 2001 From: Jaeyeon Kim Date: Mon, 11 Oct 2021 23:32:50 +0900 Subject: [PATCH 2/2] Update pkg/metricscollector/v1beta1/common/const.go Co-authored-by: Andrey Velichkevich --- pkg/metricscollector/v1beta1/common/const.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/metricscollector/v1beta1/common/const.go b/pkg/metricscollector/v1beta1/common/const.go index 99111d4e6b7..7a3b4c395d7 100644 --- a/pkg/metricscollector/v1beta1/common/const.go +++ b/pkg/metricscollector/v1beta1/common/const.go @@ -41,6 +41,7 @@ const ( // loss=0.3 // accuracy=0.98 // Score=-7.53e-05 + // Score=-7.53e+05 // Score=1E0 // Score=1.23E10 DefaultFilter = `([\w|-]+)\s*=\s*([+-]?\d(\.\d+)?([Ee][+-]?\d+)?)`