Skip to content

Commit 903c102

Browse files
committed
black, isort
1 parent 7858e6d commit 903c102

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

hivemind/utils/compat.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ def safe_recv(pipe: mp.connection.Connection) -> Any:
1414
try:
1515
return pipe.recv()
1616
except Exception as e:
17-
if (
18-
(isinstance(e, BlockingIOError) and str(e) == "[Errno 35] Resource temporarily unavailable") or
19-
(isinstance(e, EOFError) and str(e) == "Ran out of input")
17+
if (isinstance(e, BlockingIOError) and str(e) == "[Errno 35] Resource temporarily unavailable") or (
18+
isinstance(e, EOFError) and str(e) == "Ran out of input"
2019
):
2120
logger.warning(repr(e))
2221
time.sleep(0)

tests/test_util_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from hivemind.compression import deserialize_torch_tensor, serialize_torch_tensor
1414
from hivemind.proto.runtime_pb2 import CompressionType
1515
from hivemind.utils import BatchTensorDescriptor, DHTExpiration, HeapEntry, MSGPackSerializer, ValueWithExpiration
16-
from hivemind.utils.compat import safe_recv
1716
from hivemind.utils.asyncio import (
1817
achain,
1918
aenumerate,
@@ -27,6 +26,7 @@
2726
cancel_and_wait,
2827
enter_asynchronously,
2928
)
29+
from hivemind.utils.compat import safe_recv
3030
from hivemind.utils.mpfuture import InvalidStateError
3131
from hivemind.utils.performance_ema import PerformanceEMA
3232

0 commit comments

Comments
 (0)