Skip to content

Commit

Permalink
Fix a monitor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostrikov2 committed Nov 7, 2017
1 parent 7d18622 commit b8d4c2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,11 @@ def update_current_state(state):
final_rewards.max(), -dist_entropy.data[0],
value_loss.data[0], action_loss.data[0]))
if args.vis and j % args.vis_interval == 0:
win = visdom_plot(viz, win, args.log_dir, args.env_name, args.algo)

try:
# Sometimes monitor doesn't properly flush the outputs
win = visdom_plot(viz, win, args.log_dir, args.env_name, args.algo)
except IOError:
pass

if __name__ == "__main__":
main()

1 comment on commit b8d4c2c

@SerialIterator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add "ValueError" as an exception to make Visdom work.

Please sign in to comment.