mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
Initializing default saver inside the function (#6540)
This commit is contained in:
parent
634b437543
commit
7b955881f3
1 changed files with 4 additions and 1 deletions
|
@ -297,11 +297,14 @@ def rollout(agent,
|
|||
env_name,
|
||||
num_steps,
|
||||
num_episodes=0,
|
||||
saver=RolloutSaver(),
|
||||
saver=None,
|
||||
no_render=True,
|
||||
monitor=False):
|
||||
policy_agent_mapping = default_policy_agent_mapping
|
||||
|
||||
if saver is None:
|
||||
saver = RolloutSaver()
|
||||
|
||||
if hasattr(agent, "workers"):
|
||||
env = agent.workers.local_worker().env
|
||||
multiagent = isinstance(env, MultiAgentEnv)
|
||||
|
|
Loading…
Add table
Reference in a new issue