[BugFix] Pop instead of del CUDA_VISIBLE_DEVICES (#12962)

Signed-off-by: Hollow Man <hollowman@opensuse.org>
This commit is contained in:
ℍ𝕠𝕝𝕝𝕠𝕨 𝕄𝕒𝕟
2025-02-11 18:21:50 +02:00
committed by GitHub
parent 21f5d50fa5
commit 6c4dbe23eb
4 changed files with 9 additions and 9 deletions

View File

@@ -59,7 +59,7 @@ class MyLLM(LLM):
# a hack to make the script work.
# stop ray from manipulating CUDA_VISIBLE_DEVICES
# at the top-level
del os.environ["CUDA_VISIBLE_DEVICES"]
os.environ.pop("CUDA_VISIBLE_DEVICES", None)
# every worker will use 0.4 GPU, so that we can schedule
# 2 instances on the same GPUs.
os.environ["VLLM_RAY_PER_WORKER_GPUS"] = "0.4"