From e4e9757e8b2f4a21f96d9f3df31105b924516580 Mon Sep 17 00:00:00 2001 From: Derek Whatley Date: Wed, 13 Nov 2024 16:19:50 -0500 Subject: [PATCH] Fix key error in image retrieval payload data content --- .../inputs/converters/image_retrieval_converter.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/genai-perf/genai_perf/inputs/converters/image_retrieval_converter.py b/genai-perf/genai_perf/inputs/converters/image_retrieval_converter.py index 3c9a84d2..768233e3 100644 --- a/genai-perf/genai_perf/inputs/converters/image_retrieval_converter.py +++ b/genai-perf/genai_perf/inputs/converters/image_retrieval_converter.py @@ -45,7 +45,7 @@ def check_config(self, config: InputsConfig) -> None: def convert( self, generic_dataset: GenericDataset, config: InputsConfig ) -> Dict[Any, Any]: - request_body: Dict[str, Any] = {"input": []} + request_body: Dict[str, Any] = {"data": []} for file_data in generic_dataset.files_data.values(): for index, row in enumerate(file_data.rows): @@ -58,7 +58,11 @@ def _create_payload( self, row: DataRow, config: InputsConfig ) -> Dict[Any, Any]: content = self._retrieve_content(row, config) - return content + + payload = { + "input": content + } + return payload def _retrieve_content( self, row: DataRow, config: InputsConfig