diff --git a/src/petals/__init__.py b/src/petals/__init__.py index d2f91bc..c9f8223 100644 --- a/src/petals/__init__.py +++ b/src/petals/__init__.py @@ -11,7 +11,7 @@ from petals.models import * from petals.utils import * from petals.utils.logging import initialize_logs as _initialize_logs -__version__ = "2.0.1" +__version__ = "2.0.1.post1" if not os.getenv("PETALS_IGNORE_DEPENDENCY_VERSION"): diff --git a/src/petals/utils/ping.py b/src/petals/utils/ping.py index 4245bf4..5e3e775 100644 --- a/src/petals/utils/ping.py +++ b/src/petals/utils/ping.py @@ -24,7 +24,10 @@ async def ping( start_time = time.perf_counter() await node.protocol.get_stub(peer_id).rpc_ping(ping_request, timeout=wait_timeout) return time.perf_counter() - start_time - except Exception: + except Exception as e: + if str(e) == "protocol not supported": # Happens on servers with client-mode DHT (e.g., reachable via relays) + return time.perf_counter() - start_time + logger.debug(f"Failed to ping {peer_id}:", exc_info=True) return math.inf