From 5353c9b0160586cee8413bfcbc1a11ef1076df47 Mon Sep 17 00:00:00 2001 From: Itay Alroy <75032521+itayalroy@users.noreply.github.com> Date: Wed, 11 Mar 2026 12:08:55 +0200 Subject: [PATCH] platforms: Fix Ray DP startup crash (#36665) Signed-off-by: Itay Alroy --- vllm/platforms/interface.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vllm/platforms/interface.py b/vllm/platforms/interface.py index 774d9e071..b53852499 100644 --- a/vllm/platforms/interface.py +++ b/vllm/platforms/interface.py @@ -638,6 +638,11 @@ class Platform: """Raises if this request is unsupported on this platform""" def __getattr__(self, key: str): + # Pickle checks dunder methods like __getstate__. If we return None + # for them, pickle treats it like a real value and tries to call it. + if key.startswith("__") and key.endswith("__"): + raise AttributeError(key) + device = getattr(torch, self.device_type, None) if device is not None and hasattr(device, key): attr = getattr(device, key)