Skip to content

Commit b1320b2

Browse files
MoonRide303SzymonOzog
authored andcommitted
[Bugfix] Do not use resource module on Windows (vllm-project#12858) (vllm-project#13029)
Signed-off-by: SzymonOzog <[email protected]>
1 parent 13e0d27 commit b1320b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vllm/utils.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import multiprocessing
1616
import os
1717
import re
18-
import resource
1918
import signal
2019
import socket
2120
import subprocess
@@ -2070,6 +2069,11 @@ def memory_profiling(
20702069

20712070
# Adapted from: https://github.com/sgl-project/sglang/blob/v0.4.1/python/sglang/srt/utils.py#L630 # noqa: E501
20722071
def set_ulimit(target_soft_limit=65535):
2072+
if sys.platform.startswith('win'):
2073+
logger.info("Windows detected, skipping ulimit adjustment.")
2074+
return
2075+
2076+
import resource
20732077
resource_type = resource.RLIMIT_NOFILE
20742078
current_soft, current_hard = resource.getrlimit(resource_type)
20752079

0 commit comments

Comments
 (0)