From 8dcf26ebff38f3730d2666c546bb9bca32d95843 Mon Sep 17 00:00:00 2001 From: Dipika Sikka Date: Tue, 20 Feb 2024 10:18:38 -0800 Subject: [PATCH] fix json export to remove middleware (#1612) Co-authored-by: Dipika Sikka --- 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