Add timeout param to ray.get (#6107)

This commit is contained in:
Ujval Misra
2019-11-14 00:50:04 -08:00
committed by Richard Liaw
parent e4c0843f60
commit e3e3ad4b25
12 changed files with 100 additions and 20 deletions
+4 -1
View File
@@ -84,7 +84,8 @@ from ray.exceptions import (
RayError,
RayletError,
RayTaskError,
ObjectStoreFullError
ObjectStoreFullError,
RayTimeoutError,
)
from ray.experimental.no_return import NoReturn
from ray.function_manager import FunctionDescriptor
@@ -138,6 +139,8 @@ cdef int check_status(const CRayStatus& status) nogil except -1:
raise ObjectStoreFullError(message)
elif status.IsInterrupted():
raise KeyboardInterrupt()
elif status.IsTimedOut():
raise RayTimeoutError(message)
else:
raise RayletError(message)