ray.rllib.evaluation.rollout_worker.RolloutWorker.set_global_vars
ray.rllib.evaluation.rollout_worker.RolloutWorker.set_global_vars#
- RolloutWorker.set_global_vars(global_vars: dict, policy_ids: Optional[List[str]] = None) None [source]#
Updates this worker’s and all its policies’ global vars.
Updates are done using the dict’s update method.
- Parameters
global_vars – The global_vars dict to update the
self.global_vars
dict from.policy_ids – Optional list of Policy IDs to update. If None, will update all policies on the to-be-updated workers.
Examples
>>> worker = ... >>> global_vars = worker.set_global_vars( ... {"timestep": 4242})