2024-09-18 09:56:58 -04:00
|
|
|
import os
|
|
|
|
|
2024-10-10 12:39:36 -07:00
|
|
|
from vllm.compilation.levels import CompilationLevel
|
|
|
|
|
2024-08-28 16:10:12 -07:00
|
|
|
from ..utils import compare_two_settings
|
|
|
|
|
2024-09-18 09:56:58 -04:00
|
|
|
# --enforce-eager on TPU causes graph compilation
|
|
|
|
# this times out default Health Check in the MQLLMEngine,
|
|
|
|
# so we set the timeout here to 30s
|
|
|
|
os.environ["VLLM_RPC_TIMEOUT"] = "30000"
|
|
|
|
|
2024-08-28 16:10:12 -07:00
|
|
|
|
|
|
|
def test_custom_dispatcher():
|
2024-10-10 12:39:36 -07:00
|
|
|
compare_two_settings(
|
|
|
|
"google/gemma-2b",
|
|
|
|
arg1=["--enforce-eager"],
|
|
|
|
arg2=["--enforce-eager"],
|
|
|
|
env1={"VLLM_TORCH_COMPILE_LEVEL": str(CompilationLevel.DYNAMO_ONCE)},
|
|
|
|
env2={"VLLM_TORCH_COMPILE_LEVEL": str(CompilationLevel.DYNAMO_AS_IS)})
|