diff --git a/genai-perf/genai_perf/profile_data_parser/image_retrieval_profile_data_parser.py b/genai-perf/genai_perf/profile_data_parser/image_retrieval_profile_data_parser.py index 561cb1c9..911a5797 100755 --- a/genai-perf/genai_perf/profile_data_parser/image_retrieval_profile_data_parser.py +++ b/genai-perf/genai_perf/profile_data_parser/image_retrieval_profile_data_parser.py @@ -67,6 +67,7 @@ def _parse_requests(self, requests: dict) -> ImageRetrievalMetrics: request_latencies.append(req_latency_ns) payload = load_json_str(req_inputs["payload"]) + print(payload) contents = payload["input"] num_images = len([c for c in contents if c["type"] == "image_url"]) diff --git a/genai-perf/tests/test_image_retrieval_profile_data_parser.py b/genai-perf/tests/test_image_retrieval_profile_data_parser.py index 5ec2c382..ec73fba4 100644 --- a/genai-perf/tests/test_image_retrieval_profile_data_parser.py +++ b/genai-perf/tests/test_image_retrieval_profile_data_parser.py @@ -56,26 +56,18 @@ class TestImageRetrievalProfileDataParser: { "timestamp": 1, "request_inputs": { - "payload": '{"messages":[{"role":"user","content":[{"type":"image_url","image_url":{"url":"image1"}},{"type":"image_url","image_url":{"url":"image2"}}]}],"model":"yolox"}' + "payload": '{"input":[{"type":"image_url","image_url":{"url":"image1"}},{"type":"image_url","image_url":{"url":"image2"}}]}' }, "response_timestamps": [3], - "response_outputs": [ - { - "response": '{"object":"list","data":[],"model":"yolox","usage":null}' - } - ], + "response_outputs": [{"response": '{"data":[]}'}], }, { "timestamp": 3, "request_inputs": { - "payload": '{"messages":[{"role":"user","content":[{"type":"image_url","image_url":{"url":"image1"}},{"type":"image_url","image_url":{"url":"image2"}},{"type":"image_url","image_url":{"url":"image3"}}]}],"model":"yolox"}' + "payload": '{"input":[{"type":"image_url","image_url":{"url":"image1"}},{"type":"image_url","image_url":{"url":"image2"}},{"type":"image_url","image_url":{"url":"image3"}}]}' }, "response_timestamps": [7], - "response_outputs": [ - { - "response": '{"object":"list","data":[],"model":"yolox","usage":null}' - } - ], + "response_outputs": [{"response": '{"data":[]}'}], }, ], }