(self, target_function)
set the active learning main loop function for paralleling.

        Parameters
        ----------
        target_function: function
set the active learning main loop function for paralleling.
set the active learning main loop function for paralleling .
def set_target_function(self, target_function):
        """set the active learning main loop function for paralleling.

        Parameters
        ----------
        target_function: function
        """
        # check target function validity
        argname = inspect.getfullargspec(target_function)[0]
        for name1 in ['round', 'train_id', 'test_id', 'Ucollection', 'Lcollection', 'saver', 'examples', 'labels',
                      'global_parameters']:
            if name1 not in argname:
                raise NameError(
                    "the parameters of target_func must be (round, train_id, test_id, "
                    "Ucollection, Lcollection, saver, examples, labels, global_parameters)")
        self._target_func = target_function
def set_target_function ( self , target_function ) : # check target function validity argname = inspect . getfullargspec ( target_function ) [ 0 ] for name1 in [ 'round' , 'train_id' , 'test_id' , 'Ucollection' , 'Lcollection' , 'saver' , 'examples' , 'labels' , 'global_parameters' ] : if name1 not in argname : raise NameError ( "the parameters of target_func must be (round, train_id, test_id, " "Ucollection, Lcollection, saver, examples, labels, global_parameters)" ) self . _target_func = target_function