-
Notifications
You must be signed in to change notification settings - Fork 723
Fixed step used to log SAC summary #1008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -314,6 +314,7 @@ def setup_model(self): | |
| self.summary = tf.summary.merge_all() | ||
|
|
||
| def _train_step(self, step, writer, learning_rate): | ||
| del step | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if step is not used anymore, why not removing it from the arguments?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good point! I will do that instead, wasn't sure if it followed a train_step template used by other algorithms as well, but it appears that is not the case
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed step, and fixed issue of wrapping replay_buffer on each call to learn (now only happens on the first one). Although let me know if you think it is better to check if self.model.replay_buffer is wrapped instead using |
||
| # Sample a batch from the replay buffer | ||
| batch = self.replay_buffer.sample(self.batch_size, env=self._vec_normalize_env) | ||
| batch_obs, batch_actions, batch_rewards, batch_next_obs, batch_dones = batch | ||
|
|
@@ -336,7 +337,7 @@ def _train_step(self, step, writer, learning_rate): | |
| if writer is not None: | ||
| out = self.sess.run([self.summary] + self.step_ops, feed_dict) | ||
| summary = out.pop(0) | ||
| writer.add_summary(summary, step) | ||
| writer.add_summary(summary, self.num_timesteps) | ||
| else: | ||
| out = self.sess.run(self.step_ops, feed_dict) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.