mirror of
https://github.com/wassname/ray.git
synced 2026-09-17 12:41:04 +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
@@ -32,7 +32,7 @@ def collect_episodes(local_evaluator,
|
||||
for a in remote_evaluators
|
||||
]
|
||||
collected, _ = ray.wait(
|
||||
pending, num_returns=len(pending), timeout=timeout_seconds * 1000)
|
||||
pending, num_returns=len(pending), timeout=timeout_seconds * 1.0)
|
||||
num_metric_batches_dropped = len(pending) - len(collected)
|
||||
|
||||
metric_lists = ray.get(collected)
|
||||
|
||||
@@ -28,7 +28,8 @@ class TaskPool(object):
|
||||
def completed(self):
|
||||
pending = list(self._tasks)
|
||||
if pending:
|
||||
ready, _ = ray.wait(pending, num_returns=len(pending), timeout=10)
|
||||
ready, _ = ray.wait(
|
||||
pending, num_returns=len(pending), timeout=0.01)
|
||||
for obj_id in ready:
|
||||
yield (self._tasks.pop(obj_id), self._objects.pop(obj_id))
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ class Filter(object):
|
||||
"""Creates a new object with same state as self.
|
||||
|
||||
Returns:
|
||||
copy (Filter): Copy of self"""
|
||||
A copy of self.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def sync(self, other):
|
||||
|
||||
Reference in New Issue
Block a user