Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a2b4fb7
Move sampler config into main YAML
Apr 14, 2020
94c684c
Make CLI override YAML
Apr 14, 2020
54e9914
Bring back default functionality, curriculum loader
Apr 15, 2020
df4a358
Load curriculum from same YAML
Apr 15, 2020
3a84c13
Example WallJump curriculum
Apr 15, 2020
92c9682
New-format YAML files
Apr 15, 2020
9dcf38d
Fix walljump curriculum
Apr 16, 2020
a926d4c
Commit SAC parameters
Apr 16, 2020
419a156
Delete old configs and add gail
Apr 16, 2020
c80c359
Change some of the documentation
Apr 17, 2020
f020ecc
Merge master into develop-single-config
Apr 17, 2020
0fa8f8b
More doc updates
Apr 17, 2020
72b39f0
Fix Yamato test
Apr 17, 2020
0c89258
Fix learn.py test
Apr 17, 2020
b84396f
More docs updates
Apr 17, 2020
756a75f
Update migrating.md file
Apr 17, 2020
cb97315
Update changelog and improve migrating
Apr 17, 2020
7bb6366
Don't hard break trying to get curriculum out of bad config
Apr 17, 2020
e0b8c9c
Use behavior name instead of brain
Apr 17, 2020
8d37045
Fix yamato_utils
Apr 17, 2020
b20ab5d
Merge branch 'master' of github.com:Unity-Technologies/ml-agents into…
Apr 17, 2020
50eafc2
Delete curricula
Apr 17, 2020
cf920b6
Merge branch 'master' of github.com:Unity-Technologies/ml-agents into…
Apr 17, 2020
eb3df94
Make RunOptions and YAML compatible
Apr 20, 2020
4171565
Rename walljump yaml SAC
Apr 21, 2020
4330c02
Fix newline formatting
Apr 21, 2020
41dd3f7
Merge branch 'master' into develop-single-config
Apr 22, 2020
75ad833
Update SAC configurations
Apr 22, 2020
5a75d7f
Edit Changelog
Apr 22, 2020
9ba2ef3
Fix learn.py tests
Apr 22, 2020
36c9591
Update strikers vs goalie and add Worm
Apr 23, 2020
79c8a6c
Merge branch 'master' into develop-single-config
Apr 23, 2020
3568c2e
Merge branch 'master' into develop-single-config
Apr 29, 2020
4d27ed5
Use hard links in Migrating.md
Apr 29, 2020
597635c
Merge branch 'master' into develop-single-config
Apr 29, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Load curriculum from same YAML
  • Loading branch information
Ervin Teng committed Apr 15, 2020
commit df4a358dad8045c95f16af37ffb73c32ac0b7dbf
21 changes: 4 additions & 17 deletions ml-agents/mlagents/trainers/learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
load_config,
TrainerFactory,
handle_existing_directories,
assemble_curriculum_config,
)
from mlagents.trainers.stats import (
TensorboardWriter,
Expand Down Expand Up @@ -50,18 +51,6 @@ def _create_parser():
argparser.add_argument(
"--env", default=None, dest="env_path", help="Name of the Unity executable "
)
argparser.add_argument(
"--curriculum",
default=None,
dest="curriculum_config_path",
help="Curriculum config yaml file for environment",
)
argparser.add_argument(
"--sampler",
default=None,
dest="sampler_file_path",
help="Reset parameter yaml file for environment",
)
argparser.add_argument(
"--keep-checkpoints",
default=5,
Expand Down Expand Up @@ -239,24 +228,22 @@ def from_argparse(args: argparse.Namespace) -> "RunOptions":
"""
argparse_args = vars(args)
config_path = argparse_args["trainer_config_path"]
curriculum_config_path = argparse_args["curriculum_config_path"]
full_config = load_config(config_path)
try:
argparse_args["trainer_config"] = full_config["behaviors"]
except KeyError:
raise TrainerConfigError(
"Trainer configurations not found. Make sure your YAML file has a section for behaviors."
)
if curriculum_config_path is not None:
argparse_args["curriculum_config"] = load_config(curriculum_config_path)
curriculum_config = assemble_curriculum_config(argparse_args["trainer_config"])
if len(curriculum_config) > 0:
argparse_args["curriculum_config"] = curriculum_config
if "parameter_randomization" in full_config:
argparse_args["sampler_config"] = full_config["parameter_randomization"]
# Keep deprecated --load working, TODO: remove
argparse_args["resume"] = argparse_args["resume"] or argparse_args["load_model"]
# Since argparse accepts file paths in the config options which don't exist in CommandLineOptions,
# these keys will need to be deleted to use the **/splat operator below.
argparse_args.pop("sampler_file_path")
argparse_args.pop("curriculum_config_path")
argparse_args.pop("trainer_config_path")
return RunOptions(**vars(args))

Expand Down