Remove unused imports, methods

pull/510/head
Aleksandr Borzunov 9 months ago
parent f20d75ca69
commit 22da72aeeb

@ -4,7 +4,7 @@ from typing import Iterable, List, Optional, Sequence, Tuple, Type, TypeVar
from hivemind import get_logger
from petals.data_structures import UID_DELIMITER, ModuleUID, RemoteModuleInfo, RemoteSpanInfo, ServerState, parse_uid
from petals.data_structures import ModuleUID, RemoteModuleInfo, RemoteSpanInfo, ServerState, parse_uid
logger = get_logger(__name__)

@ -61,10 +61,6 @@ class ServerInfo:
cache_tokens_left: Optional[pydantic.conint(ge=0, strict=True)] = None
next_pings: Optional[Dict[str, pydantic.confloat(ge=0, strict=True)]] = None
def get(self, name: str, default: Any = None) -> Any:
value = getattr(self, name)
return value if value is not None else default
def to_tuple(self) -> Tuple[int, float, dict]:
extra_info = dataclasses.asdict(self)
del extra_info["state"], extra_info["throughput"]

@ -4,7 +4,7 @@ from typing import Dict, List, Optional, Tuple
import numpy as np
from hivemind import PeerID, get_logger
from petals.data_structures import UID_DELIMITER, RemoteModuleInfo, ServerState, parse_uid
from petals.data_structures import RemoteModuleInfo, ServerState, parse_uid
__all__ = ["choose_best_blocks", "should_choose_other_blocks"]

Loading…
Cancel
Save