rlberry.manager
.preset_manager¶
- rlberry.manager.preset_manager(*args, **kwds)[source]¶
Preset an ExperimentManager to some fixed keywords.
Examples
>>> from rlberry.agents.torch import PPOAgent, DQNAgent >>> from rlberry.manager import preset_manager >>> from rlberry.envs import Acrobot >>> env_ctor = Acrobot >>> env_kwargs = {} >>> >>> manager_maker = preset_manager(train_env=(env_ctor, env_kwargs), >>> eval_kwargs=dict(eval_horizon=500), >>> n_fit=4, >>> parallelization = "process", >>> mp_context="spawn", >>> seed=42, >>> max_workers=6 >>> ) >>> ppo = manager_maker(PPOAgent, fit_budget = 100) # of type ExperimentManager >>> dqn = manager_maker(DQNAgent, fit_budget = 200) >>> >>> ppo.fit() >>> dqn.fit()