This PR changes the type of update_counter from a pure int to a
multiprocessing.value. The reason behind this change is
that the update_counter is used as the
generation id in the grpc mode and is shared with the server process.
A lock is added to secure that no broken model will be shared between
the server and learner in grpc mode.
This PR changes the type of
update_counter
from a pure int to amultiprocessing.value
. The reason behind this change is that theupdate_counter
is used as thegeneration id
in thegrpc
mode and is shared with the server process.A lock is added to secure that no broken model will be shared between the server and learner in grpc mode.