[Core] Add an environment variable which needs to be set explicitly to allow BlockSpaceManagerV1 (#9149)

This commit is contained in:
sroy745
2024-10-09 23:17:17 -07:00
committed by GitHub
parent a64e7b9407
commit f3a507f1d3
14 changed files with 94 additions and 8 deletions

View File

@@ -678,3 +678,12 @@ def get_client_text_logprob_generations(
return [(text_generations, text,
(None if x.logprobs is None else x.logprobs.top_logprobs))
for completion in completions for x in completion.choices]
def check_deprecated_block_manager_usage(test_name: str):
assert envs.VLLM_ALLOW_DEPRECATED_BLOCK_MANAGER_V1 is True, (
f"To allow the use of deprecated BlockSpaceManagerV1, set the "
f"environment variable VLLM_ALLOW_DEPRECATED_BLOCK_MANAGER_V1=1. "
f"You can run the tests with: "
f"`VLLM_ALLOW_DEPRECATED_BLOCK_MANAGER_V1=1 pytest {test_name}`" #noqa
)