(self, kwargs)
Set input parameters based on the request.
        :
        :For details refer to the GitHub project: https://github.com/nabeel-oz/qlik-py-tools
Set input parameters based on the request.
        :
        :For details refer to the GitHub project: https://github.com/nabeel-oz/qlik-py-tools
Set input parameters based on the request . : : For details refer to the GitHub project : https : // github . com / nabeel - oz / qlik - py - tools
def _set_params(self, kwargs):
        """
        Set input parameters based on the request.
        :
        :For details refer to the GitHub project: https://github.com/nabeel-oz/qlik-py-tools
        """
        
        # If key word arguments were included in the request, get the parameters and values,
        # by transforming the string of arguments into a dictionary
        self.kwargs = {} if len(kwargs)==0 else utils.get_kwargs(kwargs)
            
        # Set the debug option for generating execution logs
        # Valid values are: true, false
        self.debug = False if 'debug' not in self.kwargs else ('true' == self.kwargs.pop('debug').lower())
            
        # Additional information is printed to the terminal and logs if the paramater debug = true
        if self.debug:
            # Increment log counter for the class. Each instance of the class generates a new log.
            self.__class__.log_no += 1

            # Create a log file for the instance
            # Logs will be stored in ..\logs\Common Functions Log <n>.txt
            self.logfile = os.path.join(os.getcwd(), 'logs', 'Common Functions Log {}.txt'.format(self.log_no))

            self._print_log(1)
        
        # Set the name of the function to be called on the model
        # By default this is the 'predict' function, but could be other functions such as 'predict_proba' if supported by the model
        self.prediction_func = 'predict' if 'return' not in self.kwargs else self.kwargs.pop('return')

        # Certain models may need sorted data for predictions
        # A feature can be specified for use in sorting using the identifier argument. 
        self.identifier = None if 'identifier' not in self.kwargs else self.kwargs.pop('identifier')
        
        # The identifier can be excluded from the inputs to the model using the exclude_identifier argument.
        self.exclude_identifier = False if 'exclude_identifier' not in self.kwargs else (self.kwargs.pop('exclude_identifier').lower()=='true')

        # Number of seconds to wait if a Keras model is being loaded by another thread
        self.wait = 2 if 'keras_wait' not in self.kwargs else utils.atoi(self.kwargs.pop('keras_wait'))

        # Number of retries if a Keras model is being loaded by another thread
        self.retries = 5 if 'keras_retries' not in self.kwargs else utils.atoi(self.kwargs.pop('keras_retries'))
        
        # Get the rest of the parameters, converting values to the correct data type
        self.pass_on_kwargs = {} if len(self.kwargs)==0 else utils.get_kwargs_by_type(self.kwargs) 

        # The predictions may need to be decoded in case of classification labels
        # The labels can be passed as a dictionary using the 'labels' argument.
        self.labels = None if 'labels' not in self.pass_on_kwargs else self.pass_on_kwargs.pop('labels')
                          
        # Debug information is printed to the terminal and logs if the paramater debug = true
        if self.debug:
            self._print_log(2)
        
        # Remove the kwargs column from the request_df
        self.request_df = self.request_df.drop(['kwargs'], axis=1)
def _set_params ( self , kwargs ) : # If key word arguments were included in the request, get the parameters and values, # by transforming the string of arguments into a dictionary self . kwargs = { } if len ( kwargs ) == 0 else utils . get_kwargs ( kwargs ) # Set the debug option for generating execution logs # Valid values are: true, false self . debug = False if 'debug' not in self . kwargs else ( 'true' == self . kwargs . pop ( 'debug' ) . lower ( ) ) # Additional information is printed to the terminal and logs if the paramater debug = true if self . debug : # Increment log counter for the class. Each instance of the class generates a new log. self . __class__ . log_no += 1 # Create a log file for the instance # Logs will be stored in ..\logs\Common Functions Log <n>.txt self . logfile = os . path . join ( os . getcwd ( ) , 'logs' , 'Common Functions Log {}.txt' . format ( self . log_no ) ) self . _print_log ( 1 ) # Set the name of the function to be called on the model # By default this is the 'predict' function, but could be other functions such as 'predict_proba' if supported by the model self . prediction_func = 'predict' if 'return' not in self . kwargs else self . kwargs . pop ( 'return' ) # Certain models may need sorted data for predictions # A feature can be specified for use in sorting using the identifier argument.  self . identifier = None if 'identifier' not in self . kwargs else self . kwargs . pop ( 'identifier' ) # The identifier can be excluded from the inputs to the model using the exclude_identifier argument. self . exclude_identifier = False if 'exclude_identifier' not in self . kwargs else ( self . kwargs . pop ( 'exclude_identifier' ) . lower ( ) == 'true' ) # Number of seconds to wait if a Keras model is being loaded by another thread self . wait = 2 if 'keras_wait' not in self . kwargs else utils . atoi ( self . kwargs . pop ( 'keras_wait' ) ) # Number of retries if a Keras model is being loaded by another thread self . retries = 5 if 'keras_retries' not in self . kwargs else utils . atoi ( self . kwargs . pop ( 'keras_retries' ) ) # Get the rest of the parameters, converting values to the correct data type self . pass_on_kwargs = { } if len ( self . kwargs ) == 0 else utils . get_kwargs_by_type ( self . kwargs ) # The predictions may need to be decoded in case of classification labels # The labels can be passed as a dictionary using the 'labels' argument. self . labels = None if 'labels' not in self . pass_on_kwargs else self . pass_on_kwargs . pop ( 'labels' ) # Debug information is printed to the terminal and logs if the paramater debug = true if self . debug : self . _print_log ( 2 ) # Remove the kwargs column from the request_df self . request_df = self . request_df . drop ( [ 'kwargs' ] , axis = 1 )