Skip to content

Commit

Permalink
[Distributed] Make it clear that % should not be tensor dict keys.
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaowei Jiang <[email protected]>
  • Loading branch information
xwjiang2010 committed Jun 27, 2024
1 parent 736ed38 commit 08ba552
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vllm/distributed/parallel_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ def _split_tensor_dict(
metadata_list: List[Tuple[str, Any]] = []
tensor_list = []
for key, value in tensor_dict.items():
assert "%" not in key, (
"Avoid having '%' in key "
"as it is used as a separator for nested entries.")
if isinstance(value, torch.Tensor):
# Note: we cannot use `value.device` here,
# because it contains not only the device type but also the device
Expand Down

0 comments on commit 08ba552

Please sign in to comment.