浏览代码

Fix comments

/develop/sac-apex
Ervin Teng 4 年前
当前提交
93351d30
共有 2 个文件被更改,包括 1 次插入9 次删除
  1. 5
      ml-agents/mlagents/trainers/trainer/rl_trainer.py
  2. 5
      ml-agents/mlagents/trainers/trainer_controller.py

5
ml-agents/mlagents/trainers/trainer/rl_trainer.py


def advance(self) -> None:
"""
Steps the trainer, taking in trajectories and updates if ready.
Will block and wait if there are no trajectories.
Will block and wait briefly if there are no trajectories.
# We grab at most the maximum length of the queue.
# This ensures that even if the queue is being filled faster than it is
# being emptied, the trajectories in the queue are on-policy.
try:
t = traj_queue.get(0.05)
self._process_trajectory(t)

5
ml-agents/mlagents/trainers/trainer_controller.py


"Environment/Lesson", curr.lesson_num
)
# # Advance trainers. This can be done in a separate loop in the future.
# with hierarchical_timer("trainer_advance"):
# for trainer in self.trainers.values():
# trainer.advance()
return num_steps
def trainer_update_func(self, trainer: Trainer) -> None:

正在加载...
取消
保存