@@ -1117,6 +1117,7 @@ def compare_two_settings(
11171117 method : str = "generate" ,
11181118 max_wait_seconds : float | None = None ,
11191119 include_seeded_sampling : bool = True ,
1120+ force_v1_runner : bool = False ,
11201121) -> None :
11211122 """
11221123 Launch API server with two different sets of arguments/environments
@@ -1130,6 +1131,9 @@ def compare_two_settings(
11301131 env2: The second set of environment variables to pass to the API server.
11311132 include_seeded_sampling: Whether to include temperature=1.0 seeded
11321133 sampling checks in the default generate comparison.
1134+ force_v1_runner: Whether to pin all compared settings to the v1 model
1135+ runner to avoid mixing model runner differences into correctness
1136+ tests.
11331137 """
11341138
11351139 compare_all_settings (
@@ -1139,6 +1143,7 @@ def compare_two_settings(
11391143 method = method ,
11401144 max_wait_seconds = max_wait_seconds ,
11411145 include_seeded_sampling = include_seeded_sampling ,
1146+ force_v1_runner = force_v1_runner ,
11421147 )
11431148
11441149
@@ -1150,6 +1155,7 @@ def compare_all_settings(
11501155 method : str = "generate" ,
11511156 max_wait_seconds : float | None = None ,
11521157 include_seeded_sampling : bool = True ,
1158+ force_v1_runner : bool = False ,
11531159) -> None :
11541160 """
11551161 Launch API server with several different sets of arguments/environments
@@ -1160,8 +1166,16 @@ def compare_all_settings(
11601166 all_envs: A list of environment dictionaries to pass to the API server.
11611167 include_seeded_sampling: Whether to include temperature=1.0 seeded
11621168 sampling checks in the default generate comparison.
1169+ force_v1_runner: Whether to pin all compared settings to the v1 model
1170+ runner to avoid mixing model runner differences into correctness
1171+ tests.
11631172 """
11641173
1174+ if force_v1_runner :
1175+ all_envs = [
1176+ {"VLLM_USE_V2_MODEL_RUNNER" : "0" , ** (env or {})} for env in all_envs
1177+ ]
1178+
11651179 trust_remote_code = False
11661180 for args in all_args :
11671181 if "--trust-remote-code" in args :
0 commit comments