This commit is contained in:
jiahangxu 2023-02-07 20:16:38 +08:00
Родитель 61b1897b8b
Коммит 9049af20ee
1 изменённых файлов: 8 добавлений и 11 удалений

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

@ -79,19 +79,16 @@ def integration_test(model_type, url, ppath, output_name = "tests/integration_te
# start testing
for pred_name, pred_version in get_predictors():
# try:
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}")
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'))
print(model_type)
print(latency_list)
print("-----")
os.system("cat tests/integration_test/test_result.txt")
for model, latency in latency_list:
item = f'{model}, {model_type}, {pred_name}, {pred_version}, {round(float(latency), 4)}\n'
# print(item)