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
521f862d
Unverified
Commit
521f862d
authored
Oct 05, 2024
by
Byron Hsu
Committed by
GitHub
Oct 05, 2024
Browse files
Fix runtime.generate when sampling param is not passed (#1582)
parent
34c32d28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/managers/io_struct.py
python/sglang/srt/managers/io_struct.py
+1
-1
No files found.
python/sglang/srt/managers/io_struct.py
View file @
521f862d
...
@@ -77,7 +77,7 @@ class GenerateReqInput:
...
@@ -77,7 +77,7 @@ class GenerateReqInput:
if
self
.
sampling_params
is
None
:
if
self
.
sampling_params
is
None
:
self
.
parallel_sample_num
=
1
self
.
parallel_sample_num
=
1
if
isinstance
(
self
.
sampling_params
,
dict
):
el
if
isinstance
(
self
.
sampling_params
,
dict
):
self
.
parallel_sample_num
=
self
.
sampling_params
.
get
(
"n"
,
1
)
self
.
parallel_sample_num
=
self
.
sampling_params
.
get
(
"n"
,
1
)
else
:
# isinstance(self.sampling_params, list):
else
:
# isinstance(self.sampling_params, list):
self
.
parallel_sample_num
=
self
.
sampling_params
[
0
].
get
(
"n"
,
1
)
self
.
parallel_sample_num
=
self
.
sampling_params
[
0
].
get
(
"n"
,
1
)
...
...
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