ray/doc/source/rllib/package_ref/evaluation/rollout_worker.rst
2022-01-20 15:30:56 -08:00

18 lines
945 B
ReStructuredText

.. _rolloutworker-reference-docs:
RolloutWorker
=============
RolloutWorkers are used as ``@ray.remote`` actors to collect and return samples
from environments or offline files in parallel. An RLlib :py:class:`~ray.rllib.agents.trainer.Trainer` usually has
``num_workers`` :py:class:`~ray.rllib.evaluation.rollout_worker.RolloutWorker`s plus a
single "local" :py:class:`~ray.rllib.evaluation.rollout_worker.RolloutWorker` (not ``@ray.remote``) in
its :py:class:`~ray.rllib.evaluation.worker_set.WorkerSet` under ``self.workers``.
Depending on its evaluation config settings, an additional :py:class:`~ray.rllib.evaluation.worker_set.WorkerSet` with
:py:class:`~ray.rllib.evaluation.rollout_worker.RolloutWorker`s for evaluation may be present in the :py:class:`~ray.rllib.agents.trainer.Trainer`
under ``self.evaluation_workers``.
.. autoclass:: ray.rllib.evaluation.rollout_worker.RolloutWorker
:special-members: __init__
:members: