run_drl¶
- class xuance.engine.run_drl.RunnerDRL(config: Namespace, envs: DummyVecEnv | SubprocVecEnv | None = None, agent=None, manage_resources: bool = None)[source]¶
Bases:
RunnerBaseRunner for single-agent Deep Reinforcement Learning (DRL).
RunnerDRL orchestrates the full lifecycle of an experiment, including environment creation, agent initialization, training, testing, and benchmarking. It is responsible for experiment-level logic rather than algorithmic details.
- Responsibilities:
Create and manage environments and agent (unless injected externally).
Control training, testing, and benchmarking workflows.
Handle experiment-level logic (run mode, evaluation loop, model saving).
Manage resource lifecycle (envs.close(), agent.finish()) based on ownership semantics.
Notes
Algorithm-specific logic should remain inside the Agent.
Runner focuses on experiment orchestration and reproducibility.