浏览代码

[skip ci] continue training until worker-0 is done

/distributed-training
Anupam Bhatnagar 5 年前
当前提交
f36108a9
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 8
      ml-agents/mlagents/trainers/trainer/trainer.py

8
ml-agents/mlagents/trainers/trainer/trainer.py


from mlagents.trainers.brain import BrainParameters
from mlagents.trainers.policy import Policy
from mlagents.trainers.exception import UnityTrainerException
from mlagents.trainers.behavior_id_utils import BehaviorIdentifiers
import horovod.tensorflow as hvd

stop training if it wasn't training to begin with, or if max_steps
is reached.
"""
return self.is_training and self.get_step <= self.get_max_steps
if hvd.rank() == 0:
logger.info("Worker = 0, step = %s", self.get_step)
return self.is_training and self.get_step <= self.get_max_steps
else:
logger.info("Worker = %s, step = %s", (hvd.rank(), self.get_step))
return True
@property
def reward_buffer(self) -> Deque[float]:

正在加载...
取消
保存