[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

@@ -1037,6 +1037,18 @@ class SchedulerConfig:
f"({self.num_scheduler_steps}) must be greater than or "
"equal to 1.")
if (not self.use_v2_block_manager \
and not envs.VLLM_ALLOW_DEPRECATED_BLOCK_MANAGER_V1):
raise ValueError(
"The use of BlockSpaceManagerV1 is deprecated and will "
"be removed in a future release. Please switch to "
"BlockSpaceManagerV2 by setting --use-v2-block-manager to "
"True. If you wish to suppress this error temporarily, "
"you can set the environment variable "
"`VLLM_ALLOW_DEPRECATED_BLOCK_MANAGER_V1=1. If your use "
"case is not supported in BlockSpaceManagerV2, please "
"file an issue with detailed information.")
@property
def is_multi_step(self) -> bool:
return self.num_scheduler_steps > 1