You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(e2e): add cache-affinity test for multimodal routing (llm-d#1562)
* test(e2e): add cache-affinity test for multimodal routing
Adds a Ginkgo case under "Running multimodal cache-affinity configuration"
that spins 2 decode pods, wires mm-embeddings-cache-producer +
mm-embeddings-cache-scorer, and asserts two identical multimodal requests
land on the same decode pod via cache-affinity scoring. Iterates over
image, audio, and video in a single It block.
Introduces swapToSimRenderSidecar so the EPP's loopback render endpoint
runs the inference sim instead of text-only Qwen2.5-1.5B; the sim emits
deterministic mm_features for all three modalities while real text-only
vLLM does not. Detection is config-content based: any EPP config
containing mm-embeddings-cache-producer triggers the sidecar swap.
Bumps the pinned sim image to v0.9.2, which includes the audio and video
mm_features stub from llm-d-inference-sim PR llm-d#539.
Fixesllm-d#1541
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
* test(e2e): extend mm cache-affinity test with discrimination + metrics
The original same-content loop passes if the scorer always picks pod 1.
Three additional assertion blocks close that gap:
- A/B image symmetry: each content key independently routes back to its
first-served pod, proving scoring is keyed on content hash rather than
"first request wins forever".
- Mixed image+audio: per-item match accounting must drive cache affinity
on a multi-modality request; probes the empty-hash short-circuit in
ExtractMMItems.
- Metric assertions on llm_d_router_epp_encoder_cache_{hits,queries}_total
with the {modality} label, wrapped in Eventually because PreRequest's
LRU write runs in a wg.Go goroutine.
Helpers added:
- runChatCompletionWithImageAndAudio for the mixed-modality body.
- getMetricValue scrapes the EPP /metrics port-forward and sums matching
series; sufficient for the small label set this test asserts on.
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
* test(e2e): address review on multimodal cache-affinity test
Rename swapToSimRenderSidecar params (eppManifests/yamlDocs), extend the
mixed request to image+audio+video, and note hits<queries in the metrics
assertion.
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
* test(e2e): add estimate token-producer per-modality metric test
Runs the mm cache-affinity config with the estimate backend and asserts
encoder-cache metrics are labelled per modality (image/audio/video). Fails
until the estimate modality fix (llm-d#1618) lands.
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
---------
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
body:=fmt.Sprintf(`{"model":%q,"messages":[{"role":"user","content":[{"type":"image_url","image_url":{"url":%q},"uuid":"image-mixed-0"},{"type":"input_audio","input_audio":{"data":%q,"format":"wav"}},{"type":"video_url","video_url":{"url":%q}},{"type":"text","text":"Describe what you see and hear."}]}],"max_tokens":150}`,
224
+
simModelName, imageURL, audioData, videoURL)
225
+
returnrunRawChatCompletion(body)
226
+
}
227
+
219
228
// runChatCompletionWithImageEmbeds sends a chat completion request with an image_embeds content block
220
229
// carrying a pre-encoded tensor. image_embeds is not a recognised multimodal type for encode
221
230
// disaggregation, so the request routes like a text request (decode-only or prefill-decode).
0 commit comments