Skip to content

Commit

Permalink
Merge pull request #265 from jinfazhu/t-validation
Browse files Browse the repository at this point in the history
fix typo in evaluator
  • Loading branch information
zhangjiajin authored Sep 14, 2022
2 parents f09015e + aa1e7ba commit be0b222
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions vega/evaluator/device_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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"))
Expand Down
4 changes: 2 additions & 2 deletions vega/evaluator/tools/evaluate_davinci_bolt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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:
Expand Down

0 comments on commit be0b222

Please sign in to comment.