Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
avnishn committed Jun 10, 2022
1 parent 8228d61 commit a32f090
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions rllib/execution/parallel_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ class AsyncRequestsManager:
Example:
>>> import time
>>> import ray
>>> from ray.rllib.execution.parallel_requests_manager import (
... AsyncRequestsManager)
>>> from ray.rllib.execution.parallel_requests import ( # doctest: +SKIP
... AsyncRequestsManager # doctest: +SKIP
>>>
>>> @ray.remote
... class MyActor:
Expand All @@ -215,15 +215,16 @@ class AsyncRequestsManager:
... time.sleep(0.5)
... return a + b
>>>
>>> workers = [MyActor.remote() for _ in range(3)]
>>> manager = AsyncRequestsManager(workers,
... max_remote_requests_in_flight_per_worker=2)
>>> manager.call(lambda worker, a, b: worker.task(a, b), fn_args=[1, 2])
>>> print(manager.get_ready())
>>> workers = [MyActor.remote() for _ in range(3)] # doctest: +SKIP
>>> manager = AsyncRequestsManager(workers, # doctest: +SKIP
... max_remote_requests_in_flight_per_worker=2) # doctest: +SKIP
>>> manager.call(lambda worker, a, b: worker.task(a, b),
... fn_kwargs={"a": 1, "b": 2})
... fn_args=[1, 2]) # doctest: +SKIP
>>> print(manager.get_ready() # doctest: +SKIP
>>> manager.call(lambda worker, a, b: worker.task(a, b), # doctest: +SKIP
... fn_kwargs={"a": 1, "b": 2}) # doctest: +SKIP
>>> time.sleep(2) # Wait for the tasks to finish.
>>> print(manager.get_ready())
>>> print(manager.get_ready()) # doctest: +SKIP
"""

def __init__(
Expand Down

0 comments on commit a32f090

Please sign in to comment.