diff --git a/data/maker/__init__.py b/data/maker/__init__.py index 8180903..7439e45 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -144,20 +144,22 @@ def generate(**_args): """ partition = _args['partition'] if 'partition' in _args else None if not partition : - LOG_DIR = os.sep.join([_args['logs'],'output',_args['context']]) + MAP_FLDER = os.sep.join([_args['logs'],'output',_args['context']]) # f = open(os.sep.join([_args['logs'],'output',_args['context'],'map.json'])) else: - LOG_DIR = os.sep.join([_args['logs'],'output',_args['context'],str(partition)]) + MAP_FOLDER = os.sep.join([_args['logs'],'output',_args['context'],str(partition)]) # f = open(os.sep.join([_args['logs'],'output',_args['context'],str(partition),'map.json'])) - f = open(os.sep.join([LOG_DIR,'map.json'])) + f = open(os.sep.join([MAP_FOLDER,'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']) args = {"context":_args['context'],"max_epochs":_args['max_epochs'],"candidates":_args['candidates']} - args['logs'] = LOG_DIR if 'logs' in _args else 'logs' + 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 @@ -177,7 +179,6 @@ def generate(**_args): lparams = {'columns':None} if partition : lparams['partition'] = partition - handler.load_meta(**lparams) # # Let us now format the matrices by reverting them to a data-frame with values diff --git a/pipeline.py b/pipeline.py index a958bb8..27f23e6 100644 --- a/pipeline.py +++ b/pipeline.py @@ -244,7 +244,7 @@ class Components : writer = factory.instance(**_args['store']) _df = _args['data'] if _schema : - columns = _df.columns.tolist + columns = [] for _item in _schema : name = _item['name'] _type = str diff --git a/setup.py b/setup.py index d09d66d..7e014c7 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ import sys def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() args = {"name":"data-maker", - "version":"1.4.7.3", + "version":"1.4.7.4", "author":"Vanderbilt University Medical Center","author_email":"steve.l.nyemba@vanderbilt.edu","license":"MIT", "packages":find_packages(),"keywords":["healthcare","data","transport","protocol"]} args["install_requires"] = ['data-transport@git+https://dev.the-phi.com/git/steve/data-transport.git','tensorflow==1.15','pandas','pandas-gbq','pymongo']