| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -144,20 +144,22 @@ def generate(**_args):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					    """
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    partition = _args['partition'] if 'partition' in _args else None
 | 
					 | 
					 | 
					 | 
					    partition = _args['partition'] if 'partition' in _args else None
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if not partition :
 | 
					 | 
					 | 
					 | 
					    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']))
 | 
					 | 
					 | 
					 | 
					        # f = open(os.sep.join([_args['logs'],'output',_args['context'],'map.json']))
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    else:
 | 
					 | 
					 | 
					 | 
					    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([_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())
 | 
					 | 
					 | 
					 | 
					    _map = json.loads(f.read())
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    f.close()
 | 
					 | 
					 | 
					 | 
					    f.close()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    #
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    # 
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # if 'file' in _args :
 | 
					 | 
					 | 
					 | 
					    # if 'file' in _args :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    #     df = pd.read_csv(_args['file'])
 | 
					 | 
					 | 
					 | 
					    #     df = pd.read_csv(_args['file'])
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # else:
 | 
					 | 
					 | 
					 | 
					    # else:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    #     df = _args['data'] if not isinstance(_args['data'],str) else pd.read_csv(_args['data'])
 | 
					 | 
					 | 
					 | 
					    #     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 = {"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 ['max_epochs'] = _args['max_epochs']
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # args['matrix_size'] = _matrix.shape[0]
 | 
					 | 
					 | 
					 | 
					    # args['matrix_size'] = _matrix.shape[0]
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    args['batch_size'] = 2000
 | 
					 | 
					 | 
					 | 
					    args['batch_size'] = 2000
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -177,7 +179,6 @@ def generate(**_args):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    lparams = {'columns':None}
 | 
					 | 
					 | 
					 | 
					    lparams = {'columns':None}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if partition :
 | 
					 | 
					 | 
					 | 
					    if partition :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        lparams['partition'] = partition
 | 
					 | 
					 | 
					 | 
					        lparams['partition'] = partition
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    handler.load_meta(**lparams)
 | 
					 | 
					 | 
					 | 
					    handler.load_meta(**lparams)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    #
 | 
					 | 
					 | 
					 | 
					    #
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # Let us now format the matrices by reverting them to a data-frame with values
 | 
					 | 
					 | 
					 | 
					    # Let us now format the matrices by reverting them to a data-frame with values
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |