From 88d602de1cb5db449c997314465ce9f93fc5cb7a Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Sun, 4 Apr 2021 11:45:20 -0500 Subject: [PATCH] ... --- pipeline.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pipeline.py b/pipeline.py index bbc54bc..87d2af6 100644 --- a/pipeline.py +++ b/pipeline.py @@ -79,7 +79,8 @@ class Components : if 'columns' in _args and 'data' in _args : _df = _args['data'] terms = _args['columns'] - return [name for name in _df.columns if np.sum( [int(field in name )for field in terms ]) > 0 ] + return [name for name in _df.columns if np.sum( [int(field in name )for field in terms ]) ] + return [] def set_gpu(self,**_args) : if 'gpu' in _args : @@ -247,7 +248,10 @@ class Components : args['gpu'] = self.set_gpu(gpu=args['gpu']) _info = {"module":"gan-prep","action":"prune","shape":{"rows":args['data'].shape[0],"columns":args['data'].shape[1]}} logger.write(_info) - candidates = (data.maker.generate(**args)) + if args['data'].shape[0] > 0 and args['data'].shape[1] > 0 : + candidates = (data.maker.generate(**args)) + else: + candidate = [df] if 'sql.BQWriter' in ostore['type'] : #table = ".".join([ostore['['dataset'],args['context']]) # writer = factory.instance(**ostore)