seldonian.RL.RL_runner.run_episodes_par¶
- run_episodes_par(create_agent_func, create_env_func, num_episodes_this_proc)¶
Run a bunch of episodes. Function that is run in a parallel process. Parameters include functions to create agent and environment because explicitly passing those often results in an error because many agents and environments aren’t picklable, a necessary condition for using Python’s multiprocessing pools.
- Parameters:
create_agent_func – Function that returns an
Agents.Agent
objectcreate_env_func – Function that returns an
Environment
object
- Num_episodes_this_proc:
Number of episodes to run in this parallel process
- Returns:
List of generated episodes