From 9622027d44f814d50ff52fc4b6829116b7074109 Mon Sep 17 00:00:00 2001 From: Dipika Sikka Date: Tue, 20 Feb 2024 17:09:07 -0800 Subject: [PATCH] fix json export to remove middleware (#1612) (#1613) 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