Unverified Commit c2650748 authored by Byron Hsu's avatar Byron Hsu Committed by GitHub
Browse files

fix int conversion for `SGLANG_CPU_COUNT` (#1803)

parent 07bf2e84
...@@ -36,11 +36,12 @@ class BaseImageProcessor(ABC): ...@@ -36,11 +36,12 @@ class BaseImageProcessor(ABC):
def __init__(self, hf_config, server_args, _processor): def __init__(self, hf_config, server_args, _processor):
self.hf_config = hf_config self.hf_config = hf_config
self._processor = _processor self._processor = _processor
self.executor = concurrent.futures.ProcessPoolExecutor( self.executor = concurrent.futures.ProcessPoolExecutor(
initializer=init_global_processor, initializer=init_global_processor,
mp_context=mp.get_context("fork"), mp_context=mp.get_context("fork"),
initargs=(server_args,), initargs=(server_args,),
max_workers=os.environ.get("SGLANG_CPU_COUNT", os.cpu_count()), max_workers=int(os.environ.get("SGLANG_CPU_COUNT", os.cpu_count())),
) )
@abstractmethod @abstractmethod
...@@ -239,7 +240,7 @@ class Qwen2VLImageProcessor(BaseImageProcessor): ...@@ -239,7 +240,7 @@ class Qwen2VLImageProcessor(BaseImageProcessor):
initializer=init_global_processor, initializer=init_global_processor,
mp_context=mp.get_context("fork"), mp_context=mp.get_context("fork"),
initargs=(server_args,), initargs=(server_args,),
max_workers=os.environ.get("SGLANG_CPU_COUNT", os.cpu_count()), max_workers=int(os.environ.get("SGLANG_CPU_COUNT", os.cpu_count())),
) )
@staticmethod @staticmethod
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment