def _get_best_candidate(self) -> Optional[ModelOutput]:
        """Find the best model output for this accelerator based on metrics.

        Returns:
            The best ModelOutput or None if no outputs are available

        """
        if not self._ep_model_map:
            return None

        model_outputs = []
        for outputs in self._ep_model_map.values():
            model_outputs.extend(outputs)

        sorted_outputs = self._sort_by_metrics(model_outputs, self._objective_dict)
        return sorted_outputs[0] if sorted_outputs else None
Find the best model output for this accelerator based on metrics.

        Returns:
            The best ModelOutput or None if no outputs are available

        
olive/engine/output.py