fix logging

This commit is contained in:
wassname committed 2018-06-24 13:06:58 +08:00
1 parent de6793c373
commit bc7f039b13
1 file changed
+3 -3
+3 -3
View File
@@ -109,13 +109,13 @@ class RandomGameReset(gym.Wrapper):
# pick a random state that's in the same game
game_states = train_states[train_states.game == game]
if self.state:
game_states = game_states[game_states.state.str.contains(self.state)]
# if self.state:
# game_states = game_states[game_states.state.str.contains(self.state)]
# Load
choice = game_states.sample().iloc[0]
state = choice.state + '.state'
logger.info('reseting to', game, state)
logger.info('reseting env %s to %s %s', self.unwrapped.rank, game, state)
with gzip.open(os.path.join(game_path, state), 'rb') as fh:
self.env.unwrapped.initial_state = fh.read()