From 7af3c3db6ac20465df98430e0429964b8f164b75 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Wed, 31 Aug 2022 17:26:45 -0500 Subject: [PATCH] bug fix --- data/maker/__init__.py | 12 ++++++------ setup.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/maker/__init__.py b/data/maker/__init__.py index 50ac8c1..bc5d9cc 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -79,16 +79,16 @@ class Learner(Process): _label = self.info['info'] if 'info' in self.info else _context # logger = transport.factory.instance(**self.store['logger']) if 'logger' in self.store else transport.factory.instance(provider=transport.providers.CONSOLE,context='write',lock=True) _args = dict({'ndx':self.ndx,'module':self.name,'table':self.info['from'],'context':_context,'info':_label,**_args}) - if self.logger: + if hasattr(self,'logger') : self.logger.write(_args) self.ndx += 1 # if hasattr(logger,'close') : # logger.close() pass except Exception as e: - print () - print (_args) - print (e) + # print () + # print (_args) + # print (e) pass finally: @@ -182,7 +182,7 @@ class Trainer(Learner): _args['gpu'] = self.gpu _args['real'] = _matrix _args['candidates'] = self.candidates - if self.logger : + if 'logger' in self.store : _args['logger'] = transport.factory.instance(**self.store['logger']) # # At this point we have the binary matrix, we can initiate training @@ -256,7 +256,7 @@ class Generator (Learner): _args['row_count'] = self._df.shape[0] if self.gpu : _args['gpu'] = self.gpu - if self.logger : + if 'logger' in self.store : _args['logger'] = transport.factory.instance(**self.store['logger']) gHandler = gan.Predict(**_args) gHandler.load_meta(columns=None) diff --git a/setup.py b/setup.py index ba52b61..7b06af8 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import sys def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -args = {"name":"data-maker","version":"1.5.8", +args = {"name":"data-maker","version":"1.5.9", "author":"Vanderbilt University Medical Center","author_email":"steve.l.nyemba@vumc.org","license":"MIT", "packages":find_packages(),"keywords":["healthcare","data","transport","protocol"]} args["install_requires"] = ['data-transport@git+https://dev.the-phi.com/git/steve/data-transport.git','tensorflow']