@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6b2b9fd934
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 13, 14:30 UTC

[CI] lora/test_mixtral.py : Add additional expected outputs due to flakiness (#28322)

Signed-off-by: Varun Sundar Rabindranath <vsundarr@redhat.com> Co-authored-by: Varun Sundar Rabindranath <vsundarr@redhat.com>

Varun Sundar Rabindranath committed Nov 9, 2025 at 21:45 UTC 6b2b9fd934af2bf59f749aa04ac739fd9c7d29f7
1 file changed +18 -11
tests/lora/test_mixtral.py
+18 -11
@@ -56,15 +56,22 @@ def test_mixtral_lora(mixtral_lora_files, tp_size):
56 )
57
58 expected_lora_output = [
59 - "give_opinion(name[SpellForce 3], release_year[2017], developer[Grimlore Games], rating[poor])", # noqa: E501
60 - "give_opinion(name[SpellForce 3], developer[Grimlore Games], release_year[2017], rating[poor])", # noqa: E501
61 - "inform(name[BioShock], release_year[2007], rating[good], genres[action-adventure, role-playing, shooter], platforms[PlayStation, Xbox, PC], available_on_steam[yes], has_linux_release[no], has_mac_release[yes])", # noqa: E501
59 + [
60 + "give_opinion(name[SpellForce 3], release_year[2017], developer[Grimlore Games], rating[poor])" # noqa: E501
61 + ],
62 + [
63 + "give_opinion(name[SpellForce 3], developer[Grimlore Games], release_year[2017], rating[poor])", # noqa: E501
64 + "give_opinion(name[SpellForce 3], release_year[2017], developer[Grimlore Games], rating[poor])", # noqa: E501
65 + ],
66 + [
67 + "inform(name[BioShock], release_year[2007], rating[good], genres[action-adventure, role-playing, shooter], platforms[PlayStation, Xbox, PC], available_on_steam[yes], has_linux_release[no], has_mac_release[yes])" # noqa: E501
68 + ],
69 ]
63 - assert (
64 - do_sample(llm, mixtral_lora_files, lora_id=1, prompts=prompts)
65 - == expected_lora_output
66 - )
67 - assert (
68 - do_sample(llm, mixtral_lora_files, lora_id=2, prompts=prompts)
69 - == expected_lora_output
70 - )
70 +
71 + def check_outputs(generated: list[str]):
72 + assert len(generated) == len(expected_lora_output)
73 + for gen, gt_choices in zip(generated, expected_lora_output):
74 + assert gen in gt_choices
75 +
76 + check_outputs(do_sample(llm, mixtral_lora_files, lora_id=1, prompts=prompts))
77 + check_outputs(do_sample(llm, mixtral_lora_files, lora_id=2, prompts=prompts))