Unverified Commit 528b3076 authored by Nicolò Lucchesi's avatar Nicolò Lucchesi Committed by GitHub
Browse files

[CI][Bugfix] Fix flaky...


[CI][Bugfix] Fix flaky `tests/v1/kv_connector/unit/test_multi_connector.py::test_multi_example_connector_consistency` (#33555)
Signed-off-by: default avatarNickLucche <nlucches@redhat.com>
parent a502831d
...@@ -151,7 +151,8 @@ def test_multi_example_connector_consistency(): ...@@ -151,7 +151,8 @@ def test_multi_example_connector_consistency():
kv_transfer_config=kv_transfer_config, kv_transfer_config=kv_transfer_config,
) )
# Run generation - this should trigger saving KV cache # Run generation - this should trigger saving KV cache
_ = llm.generate(PROMPTS, SAMPLING_PARAMS) # Use a single prompt to avoid race conditions depending on the order of scheduling
_ = llm.generate(PROMPTS[0], SAMPLING_PARAMS)
# --- Verification --- # --- Verification ---
...@@ -221,7 +222,7 @@ def test_multi_example_connector_consistency(): ...@@ -221,7 +222,7 @@ def test_multi_example_connector_consistency():
# Run generation again - this should trigger loading from the first # Run generation again - this should trigger loading from the first
# connector. # connector.
_ = llm.generate(PROMPTS, SAMPLING_PARAMS) _ = llm.generate(PROMPTS[1], SAMPLING_PARAMS)
events = get_connector_events() events = get_connector_events()
# get_num_new_matched_tokens will return new tokens from the first # get_num_new_matched_tokens will return new tokens from the first
...@@ -247,7 +248,7 @@ def test_multi_example_connector_consistency(): ...@@ -247,7 +248,7 @@ def test_multi_example_connector_consistency():
# Run generation again - this should trigger loading from the first # Run generation again - this should trigger loading from the first
# connector. # connector.
_ = llm.generate(PROMPTS, SAMPLING_PARAMS) _ = llm.generate(PROMPTS[0], SAMPLING_PARAMS)
events = get_connector_events() events = get_connector_events()
# get_num_new_matched_tokens will be called for both connectors but will # get_num_new_matched_tokens will be called for both connectors but will
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment