Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
c2650748
Unverified
Commit
c2650748
authored
Oct 26, 2024
by
Byron Hsu
Committed by
GitHub
Oct 26, 2024
Browse files
fix int conversion for `SGLANG_CPU_COUNT` (#1803)
parent
07bf2e84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
python/sglang/srt/managers/image_processor.py
python/sglang/srt/managers/image_processor.py
+3
-2
No files found.
python/sglang/srt/managers/image_processor.py
View file @
c2650748
...
...
@@ -36,11 +36,12 @@ class BaseImageProcessor(ABC):
def
__init__
(
self
,
hf_config
,
server_args
,
_processor
):
self
.
hf_config
=
hf_config
self
.
_processor
=
_processor
self
.
executor
=
concurrent
.
futures
.
ProcessPoolExecutor
(
initializer
=
init_global_processor
,
mp_context
=
mp
.
get_context
(
"fork"
),
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
...
...
@@ -239,7 +240,7 @@ class Qwen2VLImageProcessor(BaseImageProcessor):
initializer
=
init_global_processor
,
mp_context
=
mp
.
get_context
(
"fork"
),
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment