Bläddra i källkod

Fix All-Reduce fault-tolerance: catch Exception instead of BaseException (#424)

justheuristic 3 år sedan
förälder
incheckning
688b514fa6
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      hivemind/utils/asyncio.py

+ 1 - 1
hivemind/utils/asyncio.py

@@ -118,7 +118,7 @@ async def amap_in_executor(
             async for args in azip(*iterables):
                 await queue.put(loop.run_in_executor(executor, func, *args))
             await queue.put(None)
-        except BaseException as e:
+        except Exception as e:
             future = asyncio.Future()
             future.set_exception(e)
             await queue.put(future)