Skip to content

Commit

Permalink
[Bugfix] Do not use resource module on Windows (vllm-project#12858) (v…
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonRide303 authored and panf2333 committed Feb 18, 2025
1 parent 9a04677 commit c63f965
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 c63f965

Please sign in to comment.