From ccdd9ea9126c297f7860211ad167bc3005f10018 Mon Sep 17 00:00:00 2001 From: Dipika Sikka Date: Tue, 20 Feb 2024 17:48:23 +0000 Subject: [PATCH] fix json export to remove middleware --- src/deepsparse/benchmark/benchmark_pipeline.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/deepsparse/benchmark/benchmark_pipeline.py b/src/deepsparse/benchmark/benchmark_pipeline.py index b0453060ad..2695523433 100644 --- a/src/deepsparse/benchmark/benchmark_pipeline.py +++ b/src/deepsparse/benchmark/benchmark_pipeline.py @@ -346,6 +346,11 @@ def _clear_measurements(): "Generated no batch timings, try extending benchmark time with '--time'" ) + if SupportedTasks.is_text_generation(task) or SupportedTasks.is_code_generation( + task + ): + kwargs.pop("middleware_manager") + return batch_times, total_run_time, num_streams