浏览代码

get_nowait in env_manager

/develop/sac-apex
Ervin Teng 5 年前
当前提交
bdabb27f
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 4
      ml-agents/mlagents/trainers/env_manager.py

4
ml-agents/mlagents/trainers/env_manager.py


# We make sure to empty the policy queue before continuing to produce steps.
# This halts the trainers until the policy queue is empty.
while True:
_policy = self.agent_managers[brain_name].policy_queue.get(
block=False
)
_policy = self.agent_managers[brain_name].policy_queue.get_nowait()
except AgentManagerQueue.Empty:
if _policy is not None:
self.set_policy(brain_name, _policy)

正在加载...
取消
保存