rllib/evaluation/worker_set.py
def add_workers(self, num_workers: int) -> None:
        """Creates and adds a number of remote workers to this worker set.

        Can be called several times on the same WorkerSet to add more
        RolloutWorkers to the set.

        Args:
            num_workers: The number of remote Workers to add to this
                WorkerSet.
        """
        old_num_workers = len(self._remote_workers)
        self._remote_workers.extend(
            [
                self._make_worker(
                    cls=self._cls,
                    env_creator=self._env_creator,
                    validate_env=None,
                    policy_cls=self._policy_class,
                    worker_index=old_num_workers + i + 1,
                    num_workers=old_num_workers + num_workers,
                    config=self._remote_config,
                )
                for i in range(num_workers)
            ]
        )
Creates and adds a number of remote workers to this worker set.

        Can be called several times on the same WorkerSet to add more
        RolloutWorkers to the set.

        Args:
            num_workers: The number of remote Workers to add to this
                WorkerSet.
        
Creates and adds a number of remote workers to this worker set.
Can be called several times on the same WorkerSet to add more
RolloutWorkers to the set.
Creates and adds a number of remote workers to this worker set . Can be called several times on the same WorkerSet to add more RolloutWorkers to the set .
def add_workers(self, num_workers: int) -> None:
        old_num_workers = len(self._remote_workers)
        self._remote_workers.extend(
            [
                self._make_worker(
                    cls=self._cls,
                    env_creator=self._env_creator,
                    validate_env=None,
                    policy_cls=self._policy_class,
                    worker_index=old_num_workers + i + 1,
                    num_workers=old_num_workers + num_workers,
                    config=self._remote_config,
                )
                for i in range(num_workers)
            ]
        )
def add_workers ( self , num_workers : int ) -> None : old_num_workers = len ( self . _remote_workers ) self . _remote_workers . extend ( [ self . _make_worker ( cls = self . _cls , env_creator = self . _env_creator , validate_env = None , policy_cls = self . _policy_class , worker_index = old_num_workers + i + 1 , num_workers = old_num_workers + num_workers , config = self . _remote_config , ) for i in range ( num_workers ) ] )
Creates and adds a number of remote workers to this worker set.
Creates and adds a number of remote workers to this worker set .
"""Creates and adds a number of remote workers to this worker set.

        Can be called several times on the same WorkerSet to add more
        RolloutWorkers to the set.

        Args:
            num_workers: The number of remote Workers to add to this
                WorkerSet.
        """
self
num_workers
int
The number of remote Workers to add to this
WorkerSet.
The number of remote Workers to add to this WorkerSet .