From aa1e7badfa65cd3afcb81752ae4dd3ed4c2b0c11 Mon Sep 17 00:00:00 2001 From: Jinfa Zhu Date: Tue, 13 Sep 2022 20:32:46 +0800 Subject: [PATCH] fix typo in evaluator --- vega/evaluator/device_evaluator.py | 4 ++-- vega/evaluator/tools/evaluate_davinci_bolt.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vega/evaluator/device_evaluator.py b/vega/evaluator/device_evaluator.py index 5d3efae..1ff1771 100644 --- a/vega/evaluator/device_evaluator.py +++ b/vega/evaluator/device_evaluator.py @@ -168,7 +168,7 @@ def _torch_valid_metric(self, test_data, job_id): intermediate_format=self.intermediate_format, opset_version=self.opset_version, repeat_times=self.repeat_times, save_intermediate_file=self.config.save_intermediate_file, muti_input=self.muti_input) - if results.get("status") != "sucess" and error_count <= error_threshold: + if results.get("status") != "success" and error_count <= error_threshold: error_count += 1 break latency = np.float(results.get("latency")) @@ -239,7 +239,7 @@ def _tf_valid(self, test_data, latency_sum, data_num, global_step, job_id): repeat_times=self.repeat_times, precision=self.precision, cal_metric=self.calculate_metric, save_intermediate_file=self.config.save_intermediate_file, muti_input=self.muti_input) - if self.calculate_metric and results.get("status") != "sucess" and error_count <= error_threshold: + if self.calculate_metric and results.get("status") != "success" and error_count <= error_threshold: error_count += 1 break latency = np.float(results.get("latency")) diff --git a/vega/evaluator/tools/evaluate_davinci_bolt.py b/vega/evaluator/tools/evaluate_davinci_bolt.py index 74e1ea9..ced3fc3 100644 --- a/vega/evaluator/tools/evaluate_davinci_bolt.py +++ b/vega/evaluator/tools/evaluate_davinci_bolt.py @@ -101,7 +101,7 @@ def _check_backend_hardware_shape(backend, hardware, input_shape): def _post_request(remote_host, upload_data, test_data, evaluate_config): evaluate_result = post(host=remote_host, files=upload_data, data=evaluate_config) - if evaluate_result.get("status") != "sucess": + if evaluate_result.get("status") != "success": logging.warning( "Evaluate failed and will try again, the status is {}, the timestamp is {}, \ the error message is {}.".format( @@ -111,7 +111,7 @@ def _post_request(remote_host, upload_data, test_data, evaluate_config): retry_times = 4 for i in range(retry_times): evaluate_result = post(host=remote_host, files=upload_data, data=evaluate_config) - if evaluate_result.get("status") == "sucess": + if evaluate_result.get("status") == "success": logging.info("Evaluate success! The latency is {}.".format(evaluate_result["latency"])) break else: