Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo in evaluator #265

Merged
merged 1 commit into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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