Flush out print text so I can keep track of the rewards by SSHing in
This commit is contained in:
parent
912e3d42cb
commit
dcf7cce30d
1 changed files with 4 additions and 4 deletions
8
rltorch/env/simulate.py
vendored
8
rltorch/env/simulate.py
vendored
|
@ -17,7 +17,7 @@ def simulateEnvEps(env, actor, config, total_episodes = 1, memory = None, logger
|
|||
|
||||
if episode % config['print_stat_n_eps'] == 0:
|
||||
print("episode: {}/{}, score: {}"
|
||||
.format(episode, total_episodes, episode_reward))
|
||||
.format(episode, total_episodes, episode_reward), flush=True)
|
||||
|
||||
if logger is not None:
|
||||
logger.append(name + '/EpisodeReward', episode_reward)
|
||||
|
@ -51,7 +51,7 @@ class EnvironmentRunSync():
|
|||
if done:
|
||||
if self.episode_num % self.config['print_stat_n_eps'] == 0:
|
||||
print("episode: {}/{}, score: {}"
|
||||
.format(self.episode_num, self.config['total_training_episodes'], self.episode_reward))
|
||||
.format(self.episode_num, self.config['total_training_episodes'], self.episode_reward), flush=True)
|
||||
|
||||
if self.logwriter is not None:
|
||||
logger.append(self.name + '/EpisodeReward', self.episode_reward)
|
||||
|
@ -92,10 +92,10 @@ class EnvironmentEpisodeSync():
|
|||
|
||||
if self.episode_num % self.config['print_stat_n_eps'] == 0:
|
||||
print("episode: {}/{}, score: {}"
|
||||
.format(self.episode_num, self.config['total_training_episodes'], episodeReward))
|
||||
.format(self.episode_num, self.config['total_training_episodes'], episodeReward), flush=True)
|
||||
|
||||
if self.logwriter is not None:
|
||||
logger.append(self.name + '/EpisodeReward', episodeReward)
|
||||
self.logwriter.write(logger)
|
||||
|
||||
self.episode_num += 1
|
||||
self.episode_num += 1
|
||||
|
|
Loading…
Reference in a new issue