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

remove unused steps parameter from GraphManager.train

This commit is contained in:
Zach Dwiel
2018-10-02 15:29:57 -04:00
committed by zach dwiel
parent 97f608ee5e
commit 7382a142bb
2 changed files with 3 additions and 3 deletions

View File

@@ -325,7 +325,7 @@ class GraphManager(object):
[environment.handle_episode_ended() for environment in self.environments] [environment.handle_episode_ended() for environment in self.environments]
def train(self, steps: TrainingSteps) -> None: def train(self) -> None:
""" """
Perform several training iterations for all the levels in the hierarchy Perform several training iterations for all the levels in the hierarchy
:param steps: number of training iterations to perform :param steps: number of training iterations to perform
@@ -426,7 +426,7 @@ class GraphManager(object):
# The actual steps being done on the environment are decided by the agents themselves. # The actual steps being done on the environment are decided by the agents themselves.
# This is just an high-level controller. # This is just an high-level controller.
self.act(EnvironmentSteps(1)) self.act(EnvironmentSteps(1))
self.train(TrainingSteps(1)) self.train()
self.occasionally_save_checkpoint() self.occasionally_save_checkpoint()
self.phase = RunPhase.UNDEFINED self.phase = RunPhase.UNDEFINED

View File

@@ -42,7 +42,7 @@ def training_worker(graph_manager, checkpoint_dir, policy_type):
steps += 1 steps += 1
graph_manager.phase = core_types.RunPhase.TRAIN graph_manager.phase = core_types.RunPhase.TRAIN
graph_manager.train(core_types.TrainingSteps(1)) graph_manager.train()
graph_manager.phase = core_types.RunPhase.UNDEFINED graph_manager.phase = core_types.RunPhase.UNDEFINED
if steps * graph_manager.agent_params.algorithm.num_consecutive_playing_steps.num_steps > graph_manager.steps_between_evaluation_periods.num_steps * eval_offset: if steps * graph_manager.agent_params.algorithm.num_consecutive_playing_steps.num_steps > graph_manager.steps_between_evaluation_periods.num_steps * eval_offset: