(self, num_round, stop_flag=None)
stop flag for n_iter_no_change
stop flag for n_iter_no_change
stop flag for n_iter_no_change
def sync_stop_flag(self, num_round, stop_flag=None):
        """
        stop flag for n_iter_no_change
        """
        LOGGER.info("sync stop flag, boosting round is {}".format(num_round))
        if self.role == consts.GUEST:
            self.transfer_variable.stop_flag.remote(stop_flag,
                                                    role=consts.HOST,
                                                    idx=-1,
                                                    suffix=(num_round,))
        elif self.role == consts.HOST:
            return self.transfer_variable.stop_flag.get(idx=0, suffix=(num_round, ))
def sync_stop_flag ( self , num_round , stop_flag = None ) : LOGGER . info ( "sync stop flag, boosting round is {}" . format ( num_round ) ) if self . role == consts . GUEST : self . transfer_variable . stop_flag . remote ( stop_flag , role = consts . HOST , idx = - 1 , suffix = ( num_round , ) ) elif self . role == consts . HOST : return self . transfer_variable . stop_flag . get ( idx = 0 , suffix = ( num_round , ) )