Skip to content
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

About actor_learner.py #15

Open
lezhang-thu opened this issue Jul 11, 2017 · 0 comments
Open

About actor_learner.py #15

lezhang-thu opened this issue Jul 11, 2017 · 0 comments

Comments

@lezhang-thu
Copy link

lezhang-thu commented Jul 11, 2017

Look at the following code:

        with self.monitored_environment(), session_context as self.session:
            self.synchronize_workers()

            if self.is_train:
                self.train()
            else:
                self.test()

After trying several times, I felt the "with ... as" will exit even if self.train() is still running ...
self.train() is related to PseudoCountQLearner's train() function.
I tried to catch tf.errors.OutOfRangeError, which tensorflow will not re-raise.
But it seems it is not the answer. I have a feeling that tensorflow exits "with ... as" as no new training data are in its queue anymore. This might be due to the fact that PseudoCountQLearner have to compute MC mixed return. So PseudoCountQLearner waits for the end of the episode. But tensorflow cannot wait until that end.

All in all, I found no reason why the "with ... as" happened to exit earlier that self.train().
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant