Commit 66bc7d71 authored by Benjamin Beyret's avatar Benjamin Beyret
Browse files

curriculum training

parent 9d79b53a
......@@ -140,10 +140,10 @@ class MetaCurriculum(object):
Returns:
A dict from parameter to value.
"""
config = {}
# config = {}
for _, curriculum in self.brains_to_curriculums.items():
curr_config = curriculum.get_config()
config.update(curr_config)
# config.update(curr_config)
return config
return curr_config
from animalai_train.trainers.trainer_controller import TrainerController
from animalai.envs import UnityEnvironment
from animalai.envs.exception import UnityEnvironmentException
from animalai.envs.arena_config import ArenaConfig
from animalai_train.trainers.meta_curriculum import MetaCurriculum
import random
import yaml
import sys
......@@ -23,7 +22,7 @@ run_seed = 1
trainer_config_path = 'configs/trainer_config.yaml'
model_path = './models/{run_id}'.format(run_id=run_id)
summaries_dir = './summaries'
maybe_meta_curriculum = None
maybe_meta_curriculum = MetaCurriculum(curriculum_file)
def init_environment(env_path, docker_target_name, worker_id, seed):
......@@ -48,9 +47,7 @@ env = UnityEnvironment(
play=False
)
external_brains = {}
for brain_name in env.external_brain_names:
external_brains[brain_name] = env.brains[brain_name]
external_brains = {brain: env.brains[brain] for brain in env.external_brain_names}
# Create controller and begin training.
tc = TrainerController(model_path, summaries_dir, run_id + '-' + str(sub_id),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment