Determine the fit of the provided individuals.

        Parameters
        ----------
        population: a list of DEAP individual
            One individual is a list of pipeline operators and model parameters that can be
            compiled by DEAP into a callable function
        features: numpy.ndarray {n_samples, n_features}
            A numpy matrix containing the training and testing features for the individual's evaluation
        target: numpy.ndarray {n_samples}
            A numpy matrix containing the training and testing target for the individual's evaluation
        sample_weight: array-like {n_samples}, optional
            List of sample weights to balance (or un-balanace) the dataset target as needed
        groups: array-like {n_samples, }, optional
            Group labels for the samples used while splitting the dataset into train/test set

        Returns
        -------
        fitnesses_ordered: float
            Returns a list of tuple value indicating the individual's fitness
            according to its performance on the provided data

def _evaluate_individuals(self, population, features, target, sample_weight=None, groups=None):
        """Determine the fit of the provided individuals.

        Parameters
        ----------
        population: a list of DEAP individual
            One individual is a list of pipeline operators and model parameters that can be
            compiled by DEAP into a callable function
        features: numpy.ndarray {n_samples, n_features}
            A numpy matrix containing the training and testing features for the individual's evaluation
        target: numpy.ndarray {n_samples}
            A numpy matrix containing the training and testing target for the individual's evaluation
        sample_weight: array-like {n_samples}, optional
            List of sample weights to balance (or un-balanace) the dataset target as needed
        groups: array-like {n_samples, }, optional
            Group labels for the samples used while splitting the dataset into train/test set

        Returns
        -------
        fitnesses_ordered: float
            Returns a list of tuple value indicating the individual's fitness
            according to its performance on the provided data

        """
        # Evaluate the individuals with an invalid fitness
        individuals = [ind for ind in population if not ind.fitness.valid]

        # update pbar for valid individuals (with fitness values)
        if self.verbosity > 0:
            self._pbar.update(len(population)-len(individuals))

        operator_counts, eval_individuals_str, sklearn_pipeline_list, stats_dicts = self._preprocess_individuals(individuals)

        # Make the partial function that will be called below
        partial_wrapped_cross_val_score = partial(
            _wrapped_cross_val_score,
            features=features,
            target=target,
            cv=self.cv,
            scoring_function=self.scoring_function,
            sample_weight=sample_weight,
            groups=groups,
            timeout=max(int(self.max_eval_time_mins * 60), 1),
            use_dask=self.use_dask
        )

        result_score_list = []
        try:
            # Don't use parallelization if n_jobs==1
            if self._n_jobs == 1 and not self.use_dask:
                for sklearn_pipeline in sklearn_pipeline_list:
                    self._stop_by_max_time_mins()
                    val = partial_wrapped_cross_val_score(sklearn_pipeline=sklearn_pipeline)
                    result_score_list = self._update_val(val, result_score_list)
            else:
                # chunk size for pbar update
                if self.use_dask:
                    # chunk size is min of _lambda and n_jobs * 10
                    chunk_size = min(self._lambda, self._n_jobs*10)
                else:
                    # chunk size is min of cpu_count * 2 and n_jobs * 4
                    chunk_size = min(cpu_count()*2, self._n_jobs*4)
                for chunk_idx in range(0, len(sklearn_pipeline_list), chunk_size):
                    self._stop_by_max_time_mins()
                    if self.use_dask:
                        import dask
                        tmp_result_scores = [
                            partial_wrapped_cross_val_score(sklearn_pipeline=sklearn_pipeline)
                            for sklearn_pipeline in sklearn_pipeline_list[chunk_idx:chunk_idx + chunk_size]
                        ]

                        self.dask_graphs_ = tmp_result_scores
                        with warnings.catch_warnings():
                            warnings.simplefilter('ignore')
                            tmp_result_scores = list(dask.compute(*tmp_result_scores))

                    else:

                        parallel = Parallel(n_jobs=self._n_jobs, verbose=0, pre_dispatch='2*n_jobs')
                        tmp_result_scores = parallel(
                            delayed(partial_wrapped_cross_val_score)(sklearn_pipeline=sklearn_pipeline)
                            for sklearn_pipeline in sklearn_pipeline_list[chunk_idx:chunk_idx + chunk_size])
                    # update pbar
                    for val in tmp_result_scores:
                        result_score_list = self._update_val(val, result_score_list)

        except (KeyboardInterrupt, SystemExit, StopIteration) as e:
            if self.verbosity > 0:
                self._pbar.write('', file=self._file)
                self._pbar.write('{}\nTPOT closed during evaluation in one generation.\n'
                                    'WARNING: TPOT may not provide a good pipeline if TPOT is stopped/interrupted in a early generation.'.format(e),
                                 file=self._file)
            # number of individuals already evaluated in this generation
            num_eval_ind = len(result_score_list)
            self._update_evaluated_individuals_(result_score_list,
                                                eval_individuals_str[:num_eval_ind],
                                                operator_counts,
                                                stats_dicts)
            for ind in individuals[:num_eval_ind]:
                ind_str = str(ind)
                ind.fitness.values = (self.evaluated_individuals_[ind_str]['operator_count'],
                                    self.evaluated_individuals_[ind_str]['internal_cv_score'])
            # for individuals were not evaluated in this generation, TPOT will assign a bad fitness score
            for ind in individuals[num_eval_ind:]:
                ind.fitness.values = (5000.,-float('inf'))

            self._pareto_front.update(population)
            raise KeyboardInterrupt

        self._update_evaluated_individuals_(result_score_list, eval_individuals_str, operator_counts, stats_dicts)

        for ind in individuals:
            ind_str = str(ind)
            ind.fitness.values = (self.evaluated_individuals_[ind_str]['operator_count'],
                                self.evaluated_individuals_[ind_str]['internal_cv_score'])
        individuals = [ind for ind in population if not ind.fitness.valid]
        self._pareto_front.update(population)

        return population