浏览代码

Allow generalization training with specified arguments of min_reward and min_lesson_length

/develop-generalizationTraining-TrainerController
sankalp04 5 年前
当前提交
dfc8885d
共有 2 个文件被更改,包括 11 次插入1 次删除
  1. 5
      ml-agents/mlagents/trainers/learn.py
  2. 7
      ml-agents/mlagents/trainers/trainer_controller.py

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


docker_target_name=docker_target_name
)
if sampler is not None:
sampler = load_config(sampler)
reset_param_dict = load_config(reset_param_dict_path)
# reset_param_dict = load_config(reset_param_dict_path)
env_factory = create_environment_factory(
env_path,
docker_target_name,

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


lessons_incremented = self.meta_curriculum.increment_lessons(
self._get_measure_vals(), reward_buff_sizes=reward_buff_sizes
)
elif (self.sampler_manager is not None):
reward_buff_mean = {
k: np.mean(t.reward_buffer) if len(t.reward_buffer) > 0 else 0.0 for (k, t) in self.trainers.items()
}
lessons_incremented = {
k: (t > self.min_reward) for (k, t) in reward_buff_mean.items()
}
else:
lessons_incremented = {}

正在加载...
取消
保存