From c1a4a6b89750f587a3069e549416c01836cf5f2a Mon Sep 17 00:00:00 2001 From: malin10 Date: Tue, 28 Jul 2020 21:15:45 +0800 Subject: [PATCH] bug fix for ci --- core/trainers/framework/runner.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/trainers/framework/runner.py b/core/trainers/framework/runner.py index 56a3fb01..91164a65 100644 --- a/core/trainers/framework/runner.py +++ b/core/trainers/framework/runner.py @@ -359,9 +359,10 @@ class SingleRunner(RunnerBase): _str = metrics[key].cal_global_metrics( None, context["model"][model_dict["name"]]["scope"]) + metrics_result.append(_str) elif result is not None: _str = "{}={}".format(key, result[key]) - metrics_result.append(_str) + metrics_result.append(_str) if len(metrics_result) > 0: message += ", global metrics: " + ", ".join(metrics_result) print(message) @@ -406,9 +407,10 @@ class PSRunner(RunnerBase): _str = metrics[key].cal_global_metrics( context["fleet"], context["model"][model_dict["name"]]["scope"]) + metrics_result.append(_str) elif result is not None: _str = "{}={}".format(key, result[key]) - metrics_result.append(_str) + metrics_result.append(_str) if len(metrics_result) > 0: message += ", global metrics: " + ", ".join(metrics_result) print(message) @@ -537,9 +539,10 @@ class SingleInferRunner(RunnerBase): _str = metrics[key].cal_global_metrics( None, context["model"][model_dict["name"]]["scope"]) + metrics_result.append(_str) elif result is not None: _str = "{}={}".format(key, result[key]) - metrics_result.append(_str) + metrics_result.append(_str) if len(metrics_result) > 0: message += ", global metrics: " + ", ".join(metrics_result) print(message) -- GitLab