Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
68a34911
Unverified
Commit
68a34911
authored
Aug 30, 2025
by
Ning Xie
Committed by
GitHub
Aug 30, 2025
Browse files
[Misc] enhance type hint for rearrange return value (#23519)
Signed-off-by:
Andy Xie
<
andy.xning@gmail.com
>
parent
e80bca30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
vllm/distributed/eplb/eplb_state.py
vllm/distributed/eplb/eplb_state.py
+10
-7
No files found.
vllm/distributed/eplb/eplb_state.py
View file @
68a34911
...
@@ -409,12 +409,14 @@ class EplbState:
...
@@ -409,12 +409,14 @@ class EplbState:
self
.
expert_rearrangement_step
=
0
self
.
expert_rearrangement_step
=
0
self
.
rearrange
(
model
)
self
.
rearrange
(
model
)
def
rearrange
(
self
,
def
rearrange
(
self
,
model
:
MixtureOfExperts
,
model
:
MixtureOfExperts
,
is_profile
:
bool
=
False
,
is_profile
:
bool
=
False
,
execute_shuffle
:
bool
=
True
,
execute_shuffle
:
bool
=
True
,
global_expert_load
:
Optional
[
torch
.
Tensor
]
=
None
,
global_expert_load
:
Optional
[
torch
.
Tensor
]
=
None
,
rank_mapping
:
Optional
[
dict
[
int
,
int
]]
=
None
)
->
None
:
rank_mapping
:
Optional
[
dict
[
int
,
int
]]
=
None
)
->
Optional
[
torch
.
Tensor
]:
"""
"""
Rearrange the experts according to the current load.
Rearrange the experts according to the current load.
"""
"""
...
@@ -548,6 +550,7 @@ class EplbState:
...
@@ -548,6 +550,7 @@ class EplbState:
" (profile) "
if
is_profile
else
" "
,
" (profile) "
if
is_profile
else
" "
,
time_end
-
time_start
,
time_end
-
time_start
,
)
)
return
None
@
staticmethod
@
staticmethod
def
recv_state
()
->
tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
def
recv_state
()
->
tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
...
...
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