bug fixes, added logger (not yet using though)
This commit is contained in:
parent
a35c0ed6a2
commit
260f102186
|
@ -3,15 +3,3 @@ from data.params import SYS_ARGS
|
|||
import transport
|
||||
from multiprocessing import Process, Queue
|
||||
from data.maker import prepare
|
||||
|
||||
class Trainer (Process) :
|
||||
pass
|
||||
class Maker(Process):
|
||||
pass
|
||||
|
||||
if __name__ == '__main__' :
|
||||
|
||||
logger = transport.factory.instance(SYS_ARGS['store']['logger'])
|
||||
|
||||
|
||||
|
|
@ -207,9 +207,11 @@ class Learner(Process):
|
|||
self.gpu = int(_args['gpu'])
|
||||
else:
|
||||
self.gpu = None
|
||||
|
||||
self.info = _args['info']
|
||||
self.columns = self.info['columns'] if 'columns' in self.info else None
|
||||
self.store = _args['store']
|
||||
self.logger = transport.factory.instance(_args['logger']) if 'logger' in self.store else transport.factory.instance(provider='console',context='write',lock=True)
|
||||
if 'network_args' not in _args :
|
||||
self.network_args ={
|
||||
'context':_args['context'] if 'context' in _args else 'GENERAL',
|
||||
|
@ -379,11 +381,15 @@ class Generator (Learner):
|
|||
|
||||
_store = self.store['target'] if 'target' in self.store else {'provider':'console'}
|
||||
_store['lock'] = True
|
||||
_store['context'] = 'write' #-- Just in case
|
||||
writer = transport.factory.instance(**_store)
|
||||
|
||||
for _iodf in _candidates :
|
||||
_df = self._df.copy()
|
||||
_df[self.columns] = _iodf[self.columns]
|
||||
#
|
||||
#@TODO:
|
||||
# Improve formatting with better post-processing pipeline
|
||||
if 'approximate' in self.info :
|
||||
_df = self.approximate(_df)
|
||||
if 'make_date' in self.info :
|
||||
|
|
Loading…
Reference in New Issue