MCPcopy Create free account
hub / github.com/BIT-DataLab/Edit-Banana / __init__

Method __init__

sam3_service/client.py:46–51  ·  view source on GitHub ↗
(self, endpoints: List[str], timeout: int = 120)

Source from the content-addressed store, hash-verified

44
45class Sam3ServicePool:
46 def __init__(self, endpoints: List[str], timeout: int = 120) -> None:
47 if len(endpoints) == 0:
48 raise ValueError("At least one endpoint is required")
49 self.clients = [Sam3ServiceClient(url, timeout=timeout) for url in endpoints]
50 self._lock = threading.Lock()
51 self._cursor = itertools.cycle(range(len(self.clients)))
52
53 def predict(self, *args, **kwargs) -> Dict:
54 with self._lock:

Callers

nothing calls this directly

Calls 1

Sam3ServiceClientClass · 0.85

Tested by

no test coverage detected