@ -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 )