Skip to content

Commit

Permalink
[Bugfix] Do not use resource module on Windows (#12858) (#13029)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonRide303 authored Feb 11, 2025
1 parent bf3e052 commit 21f5d50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vllm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import multiprocessing
import os
import re
import resource
import signal
import socket
import subprocess
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 21f5d50

Please sign in to comment.