Skip to content

Commit c0c8192

Browse files
authored
add uses_sampler to ray executor (#1131)
Signed-off-by: Chenyaaang <chenyangli@google.com>
1 parent 4730ca0 commit c0c8192

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/executors/test_ray_distributed_executor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def __init__(self):
2727
self.prompt_adapter_config = MagicMock()
2828
self.observability_config = MagicMock()
2929
self.device_config = MagicMock()
30+
self.ec_transfer_config = MagicMock()
3031

3132

3233
@patch(

tpu_inference/executors/ray_distributed_executor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ def _init_executor(self) -> None:
108108
ip_port = self.collective_rpc("get_node_kv_ip_port")
109109
for item in ip_port:
110110
set_node_kv_ip_port(item)
111+
self.uses_sampler = self.vllm_config.model_config.runner_type != "pooling" and (
112+
self.vllm_config.ec_transfer_config is None
113+
or not self.vllm_config.ec_transfer_config.is_ec_producer)
111114

112115
def _initialize_ray_cluster(self) -> None:
113116
"""Initialize the distributed cluster with Ray.

0 commit comments

Comments
 (0)