From 9bbe9b7ff908e8baa3ba9b38fc84a38c4b1d0d09 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Tue, 30 Mar 2021 09:00:57 -0500 Subject: [PATCH] optimization (minor) --- data/maker/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/maker/__init__.py b/data/maker/__init__.py index fbdf208..611b13d 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -197,17 +197,17 @@ def generate(**_args): f = open(os.sep.join([_args['logs'],'output',_args['context'],'map.json'])) _map = json.loads(f.read()) f.close() - if 'file' in _args : - df = pd.read_csv(_args['file']) - else: - df = _args['data'] if not isinstance(_args['data'],str) else pd.read_csv(_args['data']) + # if 'file' in _args : + # df = pd.read_csv(_args['file']) + # else: + # df = _args['data'] if not isinstance(_args['data'],str) else pd.read_csv(_args['data']) args = {"context":_args['context'],"max_epochs":_args['max_epochs'],"candidates":_args['candidates']} args['logs'] = _args['logs'] if 'logs' in _args else 'logs' args ['max_epochs'] = _args['max_epochs'] # args['matrix_size'] = _matrix.shape[0] args['batch_size'] = 2000 args['partition'] = 0 if 'partition' not in _args else _args['partition'] - args['row_count'] = df.shape[0] + args['row_count'] = _args['data'].shape[0] # # @TODO: perhaps get the space of values here ... (not sure it's a good idea) #