@ -79,16 +79,16 @@ class Learner(Process):
_label = self . info [ ' info ' ] if ' info ' in self . info else _context
_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)
# 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 } )
_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 . logger . write ( _args )
self . ndx + = 1
self . ndx + = 1
# if hasattr(logger,'close') :
# if hasattr(logger,'close') :
# logger.close()
# logger.close()
pass
pass
except Exception as e :
except Exception as e :
print ( )
# print ( )
print ( _args )
# print (_args )
print ( e )
# print (e )
pass
pass
finally :
finally :
@ -182,7 +182,7 @@ class Trainer(Learner):
_args [ ' gpu ' ] = self . gpu
_args [ ' gpu ' ] = self . gpu
_args [ ' real ' ] = _matrix
_args [ ' real ' ] = _matrix
_args [ ' candidates ' ] = self . candidates
_args [ ' candidates ' ] = self . candidates
if self . logger :
if ' logger ' in self . store :
_args [ ' logger ' ] = transport . factory . instance ( * * self . store [ ' logger ' ] )
_args [ ' logger ' ] = transport . factory . instance ( * * self . store [ ' logger ' ] )
#
#
# At this point we have the binary matrix, we can initiate training
# 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 ]
_args [ ' row_count ' ] = self . _df . shape [ 0 ]
if self . gpu :
if self . gpu :
_args [ ' gpu ' ] = self . gpu
_args [ ' gpu ' ] = self . gpu
if self . logger :
if ' logger ' in self . store :
_args [ ' logger ' ] = transport . factory . instance ( * * self . store [ ' logger ' ] )
_args [ ' logger ' ] = transport . factory . instance ( * * self . store [ ' logger ' ] )
gHandler = gan . Predict ( * * _args )
gHandler = gan . Predict ( * * _args )
gHandler . load_meta ( columns = None )
gHandler . load_meta ( columns = None )