提交 c1a4a6b8 编写于 作者: M malin10

bug fix for ci

上级 339ce4ac
...@@ -359,9 +359,10 @@ class SingleRunner(RunnerBase): ...@@ -359,9 +359,10 @@ class SingleRunner(RunnerBase):
_str = metrics[key].cal_global_metrics( _str = metrics[key].cal_global_metrics(
None, None,
context["model"][model_dict["name"]]["scope"]) context["model"][model_dict["name"]]["scope"])
metrics_result.append(_str)
elif result is not None: elif result is not None:
_str = "{}={}".format(key, result[key]) _str = "{}={}".format(key, result[key])
metrics_result.append(_str) metrics_result.append(_str)
if len(metrics_result) > 0: if len(metrics_result) > 0:
message += ", global metrics: " + ", ".join(metrics_result) message += ", global metrics: " + ", ".join(metrics_result)
print(message) print(message)
...@@ -406,9 +407,10 @@ class PSRunner(RunnerBase): ...@@ -406,9 +407,10 @@ class PSRunner(RunnerBase):
_str = metrics[key].cal_global_metrics( _str = metrics[key].cal_global_metrics(
context["fleet"], context["fleet"],
context["model"][model_dict["name"]]["scope"]) context["model"][model_dict["name"]]["scope"])
metrics_result.append(_str)
elif result is not None: elif result is not None:
_str = "{}={}".format(key, result[key]) _str = "{}={}".format(key, result[key])
metrics_result.append(_str) metrics_result.append(_str)
if len(metrics_result) > 0: if len(metrics_result) > 0:
message += ", global metrics: " + ", ".join(metrics_result) message += ", global metrics: " + ", ".join(metrics_result)
print(message) print(message)
...@@ -537,9 +539,10 @@ class SingleInferRunner(RunnerBase): ...@@ -537,9 +539,10 @@ class SingleInferRunner(RunnerBase):
_str = metrics[key].cal_global_metrics( _str = metrics[key].cal_global_metrics(
None, None,
context["model"][model_dict["name"]]["scope"]) context["model"][model_dict["name"]]["scope"])
metrics_result.append(_str)
elif result is not None: elif result is not None:
_str = "{}={}".format(key, result[key]) _str = "{}={}".format(key, result[key])
metrics_result.append(_str) metrics_result.append(_str)
if len(metrics_result) > 0: if len(metrics_result) > 0:
message += ", global metrics: " + ", ".join(metrics_result) message += ", global metrics: " + ", ".join(metrics_result)
print(message) print(message)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册