[Bugfix] Fix phi3v batch inference when images have different aspect ratio (#7392)
This commit is contained in:
@@ -81,7 +81,10 @@ def run_test(
|
||||
|
||||
inputs_per_image = [(
|
||||
[prompt for _ in size_factors],
|
||||
[rescale_image_size(image, factor) for factor in size_factors],
|
||||
[
|
||||
rescale_image_size(image, factor, transpose=idx)
|
||||
for idx, factor in enumerate(size_factors)
|
||||
],
|
||||
) for image, prompt in zip(images, HF_IMAGE_PROMPTS)]
|
||||
|
||||
# NOTE: take care of the order. run vLLM first, and then run HF.
|
||||
|
||||
@@ -114,5 +114,5 @@ def test_traces(trace_service):
|
||||
SpanAttributes.LLM_LATENCY_TIME_TO_FIRST_TOKEN) == ttft
|
||||
e2e_time = metrics.finished_time - metrics.arrival_time
|
||||
assert attributes.get(SpanAttributes.LLM_LATENCY_E2E) == e2e_time
|
||||
assert attributes.get(SpanAttributes.LLM_LATENCY_TIME_IN_SCHEDULER
|
||||
) == metrics.scheduler_time
|
||||
assert attributes.get(
|
||||
SpanAttributes.LLM_LATENCY_TIME_IN_SCHEDULER) == metrics.scheduler_time
|
||||
|
||||
Reference in New Issue
Block a user