def async_update(agent, opt, rank, outputs):
th.set_num_threads(1)
# Proceed with training but keeping the current agent
args, env, _, _ = get_setup(seed_offset=rank)
is_root = (rank == 0)
train_rewards = train(args, env, agent, opt, train_update, verbose=is_root)
if is_root:
for r in train_rewards:
outputs.put(r)
评论列表
文章目录