From 09a6a49eaf09c442c9c9c70a439dd892143c8be6 Mon Sep 17 00:00:00 2001 From: Rui Qiao <161574667+ruisearch42@users.noreply.github.com> Date: Thu, 23 Oct 2025 23:53:09 -0700 Subject: [PATCH] [Misc] Avoid "PyTorch non-writable tensors" warning in RayPPCommunicator (#27443) Signed-off-by: Rui Qiao --- vllm/distributed/device_communicators/ray_communicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/distributed/device_communicators/ray_communicator.py b/vllm/distributed/device_communicators/ray_communicator.py index 3b02b885e7862..d9517f51acad3 100644 --- a/vllm/distributed/device_communicators/ray_communicator.py +++ b/vllm/distributed/device_communicators/ray_communicator.py @@ -99,7 +99,7 @@ class RayPPCommunicator(Communicator): # Ray actor IDs are 32-character hex strings (128 bits) ACTOR_ID_LEN = 32 - actor_id_bytes = actor_id_str.encode("utf-8") + actor_id_bytes = bytearray(actor_id_str.encode("utf-8")) assert len(actor_id_bytes) == ACTOR_ID_LEN, ( f"Unexpected actor ID length: {len(actor_id_bytes)}" )