From b0264e859238fd24f50ce9794fc646090c058ad9 Mon Sep 17 00:00:00 2001 From: Alexander Dokuchaev Date: Thu, 18 Jul 2024 00:53:42 +0300 Subject: [PATCH] bench try --- tests/post_training/pipelines/base.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/post_training/pipelines/base.py b/tests/post_training/pipelines/base.py index b1f7b0a558b..abbcc6bcadf 100644 --- a/tests/post_training/pipelines/base.py +++ b/tests/post_training/pipelines/base.py @@ -409,14 +409,18 @@ def run_bench(self) -> None: """ if not self.run_benchmark_app: return - runner = Command(f"benchmark_app -m {self.path_compressed_ir}") - runner.run(stdout=False) - cmd_output = " ".join(runner.output) - - match = re.search(r"Throughput\: (.+?) FPS", cmd_output) - if match is not None: - fps = match.group(1) - self.run_info.fps = float(fps) + + try: + runner = Command(f"benchmark_app -m {self.path_compressed_ir}") + runner.run(stdout=False) + cmd_output = " ".join(runner.output) + + match = re.search(r"Throughput\: (.+?) FPS", cmd_output) + if match is not None: + fps = match.group(1) + self.run_info.fps = float(fps) + except Exception as e: + print(e) def cleanup_cache(self): """