11# SPDX-License-Identifier: Apache-2.0
22# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
33
4- import os
54import time
65
7- import vllm .envs as envs
6+ import tpu_inference .envs as envs
7+ import vllm .envs as vllm_envs
88from vllm import LLM , EngineArgs
99from vllm .lora .request import LoRARequest
1010from vllm .utils .argparse_utils import FlexibleArgumentParser
@@ -55,13 +55,13 @@ def main(args: dict):
5555 "lora_adapter_3" , 3 ,
5656 "Username6568/Qwen2.5-3B-Instruct-1_plus_1_equals_3_adapter" )
5757
58- if envs .VLLM_TORCH_PROFILER_DIR is not None :
58+ if vllm_envs .VLLM_TORCH_PROFILER_DIR is not None :
5959 llm .start_profile ()
6060 start = time .perf_counter ()
6161 outputs = llm .generate (prompt ,
6262 sampling_params = sampling_params ,
6363 lora_request = lora_request )
64- if envs .VLLM_TORCH_PROFILER_DIR is not None :
64+ if vllm_envs .VLLM_TORCH_PROFILER_DIR is not None :
6565 llm .stop_profile ()
6666
6767 # Print the outputs.
@@ -77,7 +77,7 @@ def main(args: dict):
7777
7878if __name__ == "__main__" :
7979 # Skip long warmup for local simple test.
80- os . environ ['SKIP_JAX_PRECOMPILE' ] = '1'
80+ envs . environment_variables ['SKIP_JAX_PRECOMPILE' ] = lambda : True
8181
8282 parser = create_parser ()
8383 args : dict = vars (parser .parse_args ())
0 commit comments