PolicyExecutor¶
- class maze.core.agent_deployment.policy_executor.PolicyExecutor(env: ExternalCoreEnv, policy: Policy, rollout_done_event: Event, exception_queue: Queue)¶
Executes the provided policies in an Agent Deployment setting.
Policies are executed until the rollout_done event is set, indicating that the rollout has been finished. Then, a final reset is sent and execution stops. Expected to be run on a separate thread alongside the agent deployment running on the main thread.
- Parameters:
env – Environment to step.
policy – Structured policy working with structured environments.
rollout_done_event – event indicating that the rollout has been finished.
- run_rollout_loop()¶
Step the environment until the rollout is done.