Merge branch 'main' into dev/add-error-info

This commit is contained in:
jiahangxu 2023-02-07 20:32:23 +08:00
Родитель 9049af20ee bd6bcb268e
Коммит 74701d83bb
1 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -79,16 +79,15 @@ def integration_test(model_type, url, ppath, output_name = "tests/integration_te
# start testing
for pred_name, pred_version in get_predictors():
try:
since = time.time()
# print(f'nn-meter --{model_type} {ppath} --predictor {pred_name} --predictor-version {pred_version}')
result = subprocess.check_output(['nn-meter', 'predict', f'--{model_type}', f'{ppath}', '--predictor', f'{pred_name}', '--predictor-version', f'{pred_version}'])
runtime = time.time() - since
except NotImplementedError:
logging.error(f"Meets ERROR when checking --{model_type} {ppath} --predictor {pred_name} --predictor-version {pred_version}")
# try:
since = time.time()
# print(f'nn-meter --{model_type} {ppath} --predictor {pred_name} --predictor-version {pred_version}')
result = subprocess.check_output(['nn-meter', 'predict', f'--{model_type}', f'{ppath}', '--predictor', f'{pred_name}', '--predictor-version', f'{pred_version}'])
runtime = time.time() - since
# except NotImplementedError:
# logging.error(f"Meets ERROR when checking --{model_type} {ppath} --predictor {pred_name} --predictor-version {pred_version}")
latency_list = parse_latency_info(result.decode('utf-8'))
for model, latency in latency_list:
item = f'{model}, {model_type}, {pred_name}, {pred_version}, {round(float(latency), 4)}\n'
# print(item)