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

question about reloading model #8

Closed
gooooloo opened this issue Dec 25, 2017 · 4 comments
Closed

question about reloading model #8

gooooloo opened this issue Dec 25, 2017 · 4 comments

Comments

@gooooloo
Copy link

reload_best_model_weight_if_changed(self.current_model)

Please correct me if the question doesn't make sense.
When reloading the model, there may be still $max_process -1 processes in the middle stage of the game, is that right? If yes, then this reloading will cause those games using different models during one game.

@Akababa
Copy link
Owner

Akababa commented Dec 25, 2017

I haven't tested that, but I believe the with ProcessPoolExecutor block has to join() all the processes before it exits.

@gooooloo
Copy link
Author

Thanks for answering. Yet my question is the scenario like this:

  1. Game1 and Game2 are both on, both connect to the "parent process" which is serving model 1.
  2. Then game1 finishes, while game2 just played 10 moves( far away from finishing)
  3. since Game1 finished, and the reloading condition happenes to be satisfied, then triggering reload_model. Model2 is loaded. Serving model 2 now.
  4. But game2's pipe didn't change. Then game2's 11th movement will be using model2.

@Akababa
Copy link
Owner

Akababa commented Dec 26, 2017

Yes you're right, I actually never considered that (I focused on supervised learning for now). @benediamond made a fix of this today, check out his fork :)

@gooooloo
Copy link
Author

Thanks. I see it.

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

2 participants