(self, f)
Parameters
        ----------
        f : Future
            The future instance holding the result of learner evaluation.
Parameters
        ----------
        f : Future
            The future instance holding the result of learner evaluation.
Parameters ---------- f : Future The future instance holding the result of learner evaluation .
def _task_finished(self, f):
        """
        Parameters
        ----------
        f : Future
            The future instance holding the result of learner evaluation.
        """
        assert self.thread() is QThread.currentThread()
        assert self._task is not None
        assert self._task.future is f
        assert f.done()

        self._task = None
        self.progressBarFinished()

        try:
            results = f.result()  # type: List[Results]
        except Exception as ex:
            # Log the exception with a traceback
            log = logging.getLogger()
            log.exception(__name__, exc_info=True)
            self.error("Exception occurred during evaluation: {!r}".format(ex))
            # clear all results
            for key in self.results.keys():
                self.results[key] = None
        else:
            # split the combined result into per learner/model results ...
            results = [
                list(Results.split_by_model(p_results)) for p_results in results
            ]  # type: List[List[Results]]
            assert all(len(r.learners) == 1 for r1 in results for r in r1)
            assert len(results) == len(self.curvePoints)

            learners = [r.learners[0] for r in results[0]]
            learner_id = {learner: id_ for id_, learner in self.learners.items()}

            # ... and update self.results
            for i, learner in enumerate(learners):
                id_ = learner_id[learner]
                self.results[id_] = [p_results[i] for p_results in results]
        # [end-snippet-9]
        # update the display
        self._update_curve_points()
        self._update_table()
def _task_finished ( self , f ) : assert self . thread ( ) is QThread . currentThread ( ) assert self . _task is not None assert self . _task . future is f assert f . done ( ) self . _task = None self . progressBarFinished ( ) try : results = f . result ( ) # type: List[Results] except Exception as ex : # Log the exception with a traceback log = logging . getLogger ( ) log . exception ( __name__ , exc_info = True ) self . error ( "Exception occurred during evaluation: {!r}" . format ( ex ) ) # clear all results for key in self . results . keys ( ) : self . results [ key ] = None else : # split the combined result into per learner/model results ... results = [ list ( Results . split_by_model ( p_results ) ) for p_results in results ] # type: List[List[Results]] assert all ( len ( r . learners ) == 1 for r1 in results for r in r1 ) assert len ( results ) == len ( self . curvePoints ) learners = [ r . learners [ 0 ] for r in results [ 0 ] ] learner_id = { learner : id_ for id_ , learner in self . learners . items ( ) } # ... and update self.results for i , learner in enumerate ( learners ) : id_ = learner_id [ learner ] self . results [ id_ ] = [ p_results [ i ] for p_results in results ] # [end-snippet-9] # update the display self . _update_curve_points ( ) self . _update_table ( )