(self)
return copy.deepcopy(self._storage.get_best_trial(self._study_id))
Return the best trial in the study.

        Returns:
            A :class:`~optuna.trial.FrozenTrial` object of the best trial.

        Raises:
            :exc:`RuntimeError`:
                If the study has more than one direction.
Return the best trial in the study.
Return the best trial in the study .
def best_trial(self) -> FrozenTrial:
        """Return the best trial in the study.

        Returns:
            A :class:`~optuna.trial.FrozenTrial` object of the best trial.

        Raises:
            :exc:`RuntimeError`:
                If the study has more than one direction.
        """

        if self._is_multi_objective():
            raise RuntimeError(
                "A single best trial cannot be retrieved from a multi-objective study. Consider "
                "using Study.best_trials to retrieve a list containing the best trials."
            )

        return copy.deepcopy(self._storage.get_best_trial(self._study_id))
def best_trial ( self ) -> FrozenTrial : if self . _is_multi_objective ( ) : raise RuntimeError ( "A single best trial cannot be retrieved from a multi-objective study. Consider " "using Study.best_trials to retrieve a list containing the best trials." ) return copy . deepcopy ( self . _storage . get_best_trial ( self . _study_id ) )