rllib/evaluation/worker_set.py
def _worker_health_check(self) -> List[int]:
        """Performs a health-check on each remote worker.

        Returns:
            List of indices (into `self._remote_workers` list) of faulty workers.
            Note that index=1 is the 0th item in `self._remote_workers`.
        """
        logger.info("Health checking all workers ...")
        checks = []
        for worker in self.remote_workers():
            # TODO: Maybe find a better way to probe for healthiness. Performing an
            #  entire `sample()` step may be costly. Then again, we only do this
            #  upon any worker failure during the `step_attempt()`, not regularly.
            _, obj_ref = worker.sample_with_count.remote()
            checks.append(obj_ref)

        faulty_worker_indices = []
        for i, obj_ref in enumerate(checks):
            try:
                ray.get(obj_ref)
                logger.info("Worker {} looks healthy.".format(i + 1))
            except RayError:
                logger.exception("Worker {} is faulty.".format(i + 1))
                faulty_worker_indices.append(i + 1)

        return faulty_worker_indices
Performs a health-check on each remote worker.

        Returns:
            List of indices (into `self._remote_workers` list) of faulty workers.
            Note that index=1 is the 0th item in `self._remote_workers`.
        
Performs a health-check on each remote worker.
Performs a health - check on each remote worker .
def _worker_health_check(self) -> List[int]:
        logger.info("Health checking all workers ...")
        checks = []
        for worker in self.remote_workers():
            _, obj_ref = worker.sample_with_count.remote()
            checks.append(obj_ref)
        faulty_worker_indices = []
        for i, obj_ref in enumerate(checks):
            try:
                ray.get(obj_ref)
                logger.info("Worker {} looks healthy.".format(i + 1))
            except RayError:
                logger.exception("Worker {} is faulty.".format(i + 1))
                faulty_worker_indices.append(i + 1)
        return faulty_worker_indices
def _worker_health_check ( self ) -> List [ int ] : logger . info ( "Health checking all workers ..." ) checks = [ ] for worker in self . remote_workers ( ) : _ , obj_ref = worker . sample_with_count . remote ( ) checks . append ( obj_ref ) faulty_worker_indices = [ ] for i , obj_ref in enumerate ( checks ) : try : ray . get ( obj_ref ) logger . info ( "Worker {} looks healthy." . format ( i + 1 ) ) except RayError : logger . exception ( "Worker {} is faulty." . format ( i + 1 ) ) faulty_worker_indices . append ( i + 1 ) return faulty_worker_indices
Performs a health-check on each remote worker.
Performs a health - check on each remote worker .
"""Performs a health-check on each remote worker.

        Returns:
            List of indices (into `self._remote_workers` list) of faulty workers.
            Note that index=1 is the 0th item in `self._remote_workers`.
        """ # TODO: Maybe find a better way to probe for healthiness. Performing an #  entire `sample()` step may be costly. Then again, we only do this #  upon any worker failure during the `step_attempt()`, not regularly.
List of indices (into `self._remote_workers` list) of faulty workers.
Note that index=1 is the 0th item in `self._remote_workers`.
List of indices ( into ` self . _remote_workers ` list ) of faulty workers . Note that index = 1 is the 0th item in ` self . _remote_workers ` .
self