1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-18 03:30:19 +01:00

bug fix in HRL HER memory + some small improvements

This commit is contained in:
itaicaspi-intel
2018-08-29 14:36:18 +03:00
parent 1aa2ab0590
commit fd2f4b0852
3 changed files with 5 additions and 2 deletions

View File

@@ -118,6 +118,9 @@ def parse_arguments(parser: argparse.ArgumentParser) -> argparse.Namespace:
args.preset = "{}.py:graph_manager".format(os.path.join(get_base_dir(), 'presets', args.preset)) args.preset = "{}.py:graph_manager".format(os.path.join(get_base_dir(), 'presets', args.preset))
else: else:
args.preset = "{}".format(args.preset) args.preset = "{}".format(args.preset)
# if a graph manager variable was not specified, try the default of :graph_manager
if len(args.preset.split(":")) == 1:
args.preset += ":graph_manager"
# verify that the preset exists # verify that the preset exists
preset_path = args.preset.split(":")[0] preset_path = args.preset.split(":")[0]

View File

@@ -59,7 +59,7 @@ class SingleLevelSelection(LevelSelection):
if self.selected_level is None: if self.selected_level is None:
logger.screen.error("No level has been selected. Please select a level using the -lvl command line flag, " logger.screen.error("No level has been selected. Please select a level using the -lvl command line flag, "
"or change the level in the preset. \nThe available levels are: \n{}" "or change the level in the preset. \nThe available levels are: \n{}"
.format(', '.join(self.levels.keys())), crash=True) .format(', '.join(sorted(self.levels.keys()))), crash=True)
if self.selected_level not in self.levels.keys(): if self.selected_level not in self.levels.keys():
logger.screen.error("The selected level ({}) is not part of the available levels ({})" logger.screen.error("The selected level ({}) is not part of the available levels ({})"
.format(self.selected_level, ', '.join(self.levels.keys())), crash=True) .format(self.selected_level, ', '.join(self.levels.keys())), crash=True)

View File

@@ -29,7 +29,7 @@ class EpisodicHRLHindsightExperienceReplayParameters(EpisodicHindsightExperience
@property @property
def path(self): def path(self):
return 'memories.episodic.episodic_hrl_hindsight_experience_replay:EpisodicHRLHindsightExperienceReplay' return 'rl_coach.memories.episodic.episodic_hrl_hindsight_experience_replay:EpisodicHRLHindsightExperienceReplay'
class EpisodicHRLHindsightExperienceReplay(EpisodicHindsightExperienceReplay): class EpisodicHRLHindsightExperienceReplay(EpisodicHindsightExperienceReplay):