From c63f965ac060564973a2e399d22541786274b8f8 Mon Sep 17 00:00:00 2001 From: MoonRide303 <130458190+MoonRide303@users.noreply.github.com> Date: Tue, 11 Feb 2025 17:21:18 +0100 Subject: [PATCH] [Bugfix] Do not use resource module on Windows (#12858) (#13029) --- vllm/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vllm/utils.py b/vllm/utils.py index e168752766661..6a41afff8f04c 100644 --- a/vllm/utils.py +++ b/vllm/utils.py @@ -15,7 +15,6 @@ import multiprocessing import os import re -import resource import signal import socket import subprocess @@ -2070,6 +2069,11 @@ def memory_profiling( # Adapted from: https://github.com/sgl-project/sglang/blob/v0.4.1/python/sglang/srt/utils.py#L630 # noqa: E501 def set_ulimit(target_soft_limit=65535): + if sys.platform.startswith('win'): + logger.info("Windows detected, skipping ulimit adjustment.") + return + + import resource resource_type = resource.RLIMIT_NOFILE current_soft, current_hard = resource.getrlimit(resource_type)