merge_machine/abstract_data_project.py
def infer(self, module_name, params):
        '''
        Runs the module on pandas DataFrame data in memory and 
        returns answer + writes to appropriate location
        '''
        
        # Check that memory is loaded (if necessary)
        if (params is not None) and params.get('NO_MEM_DATA', False):
            data = None
        else:
            self._check_mem_data()
            self.mem_data, tab_gen = tee(self.mem_data)
            data = next(tab_gen) # Selecting the first chunk of data to perform inference
            valid_columns = [col for col in data if '__MODIFIED' not in col]
            data = data[valid_columns]
            
        # Initiate log
        log = self._init_active_log(module_name, 'infer')
        
        # We duplicate the generator to load a full version of the table and
        # while leaving self.mem_data unchanged
        infered_params = self.MODULES['infer'][module_name]['func'](data, params)
        del data
    
        # Write result of inference
        module_to_write_to = self.MODULES['infer'][module_name]['write_to']

        self.upload_config_data(infered_params, module_to_write_to, 'infered_config.json')
        
        # Update log buffer
        self._end_active_log(log, error=False)  
        
        return infered_params

        Runs the module on pandas DataFrame data in memory and 
        returns answer + writes to appropriate location
        
Runs the module on pandas DataFrame data in memory and
returns answer + writes to appropriate location
Runs the module on pandas DataFrame data in memory and returns answer + writes to appropriate location
def infer(self, module_name, params):
        if (params is not None) and params.get('NO_MEM_DATA', False):
            data = None
        else:
            self._check_mem_data()
            self.mem_data, tab_gen = tee(self.mem_data)
            data = next(tab_gen) 
            valid_columns = [col for col in data if '__MODIFIED' not in col]
            data = data[valid_columns]
        log = self._init_active_log(module_name, 'infer')
        infered_params = self.MODULES['infer'][module_name]['func'](data, params)
        del data
        module_to_write_to = self.MODULES['infer'][module_name]['write_to']
        self.upload_config_data(infered_params, module_to_write_to, 'infered_config.json')
        self._end_active_log(log, error=False)  
        return infered_params
def infer ( self , module_name , params ) : if ( params is not None ) and params . get ( 'NO_MEM_DATA' , False ) : data = None else : self . _check_mem_data ( ) self . mem_data , tab_gen = tee ( self . mem_data ) data = next ( tab_gen ) valid_columns = [ col for col in data if '__MODIFIED' not in col ] data = data [ valid_columns ] log = self . _init_active_log ( module_name , 'infer' ) infered_params = self . MODULES [ 'infer' ] [ module_name ] [ 'func' ] ( data , params ) del data module_to_write_to = self . MODULES [ 'infer' ] [ module_name ] [ 'write_to' ] self . upload_config_data ( infered_params , module_to_write_to , 'infered_config.json' ) self . _end_active_log ( log , error = False ) return infered_params
Runs the module on pandas DataFrame data in memory and
returns answer + writes to appropriate location
Runs the module on pandas DataFrame data in memory and returns answer + writes to appropriate location
'''
        Runs the module on pandas DataFrame data in memory and 
        returns answer + writes to appropriate location
        ''' # Check that memory is loaded (if necessary) # Selecting the first chunk of data to perform inference # Initiate log # We duplicate the generator to load a full version of the table and # while leaving self.mem_data unchanged # Write result of inference # Update log buffer
self
module_name
params