[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

@@ -92,7 +92,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)
super().__init__(*args, **kwargs)