Skip to content

Commit

Permalink
Fix TestImageRetrievalProfileDataParser tests
Browse files Browse the repository at this point in the history
  • Loading branch information
djwhatle committed Nov 13, 2024
1 parent 8ed722b commit 9ef7ec0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down
16 changes: 4 additions & 12 deletions genai-perf/tests/test_image_retrieval_profile_data_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":[]}'}],
},
],
}
Expand Down

0 comments on commit 9ef7ec0

Please sign in to comment.