From fa03684ffa4e5dee8d1db5e63626f7f4393408e6 Mon Sep 17 00:00:00 2001 From: Mohit Rathore Date: Thu, 20 Oct 2016 22:27:41 +0530 Subject: [PATCH] annotations for lsi_worker @Pyro4.expose annotations for lsi_worker --- gensim/models/lsi_worker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gensim/models/lsi_worker.py b/gensim/models/lsi_worker.py index ef54144328..b9de939962 100755 --- a/gensim/models/lsi_worker.py +++ b/gensim/models/lsi_worker.py @@ -39,7 +39,7 @@ class Worker(object): def __init__(self): self.model = None - + @Pyro4.expose def initialize(self, myid, dispatcher, **model_params): self.lock_update = threading.Lock() self.jobsdone = 0 # how many jobs has this worker completed? @@ -49,7 +49,7 @@ def initialize(self, myid, dispatcher, **model_params): logger.info("initializing worker #%s" % myid) self.model = lsimodel.LsiModel(**model_params) - + @Pyro4.expose @Pyro4.oneway def requestjob(self): """ @@ -81,7 +81,7 @@ def processjob(self, job): fname = os.path.join(tempfile.gettempdir(), 'lsi_worker.pkl') self.model.save(fname) - + @Pyro4.expose @utils.synchronous('lock_update') def getstate(self): logger.info("worker #%i returning its state after %s jobs" % @@ -90,7 +90,7 @@ def getstate(self): self.finished = True return self.model.projection - + @Pyro4.expose @utils.synchronous('lock_update') def reset(self): logger.info("resetting worker #%i" % self.myid)