mirror of
https://github.com/wassname/ray.git
synced 2026-07-17 11:32:33 +08:00
Change timeout from milliseconds to seconds in ray.wait. (#3706)
* Change timeout from milliseconds to seconds in ray.wait. * Suppress warning. * Suppress warning. * Add prominent warning in API documentation.
This commit is contained in:
committed by
Philipp Moritz
parent
59d861281e
commit
d1e21b702e
@@ -52,8 +52,8 @@ def wait(object_ids, num_returns=1, timeout=None, worker=None):
|
||||
List like of object IDs for objects that may or may not be ready.
|
||||
Note that these IDs must be unique.
|
||||
num_returns (int): The number of object IDs that should be returned.
|
||||
timeout (int): The maximum amount of time in milliseconds to wait
|
||||
before returning.
|
||||
timeout (float): The maximum amount of time in seconds to wait before
|
||||
returning.
|
||||
|
||||
Returns:
|
||||
A list of object IDs that are ready and a list of the remaining object
|
||||
@@ -61,6 +61,11 @@ def wait(object_ids, num_returns=1, timeout=None, worker=None):
|
||||
"""
|
||||
worker = ray.worker.global_worker if worker is None else worker
|
||||
if isinstance(object_ids, (tuple, np.ndarray)):
|
||||
return ray.wait(list(object_ids), num_returns, timeout, worker)
|
||||
return ray.wait(
|
||||
list(object_ids),
|
||||
num_returns=num_returns,
|
||||
timeout=timeout,
|
||||
worker=worker)
|
||||
|
||||
return ray.wait(object_ids, num_returns, timeout, worker)
|
||||
return ray.wait(
|
||||
object_ids, num_returns=num_returns, timeout=timeout, worker=worker)
|
||||
|
||||
Reference in New Issue
Block a user