ó
    ,ÊžjO
  ã                   ó    •  " S  S\ 5      r " S S\5      r " S S\5      r " S S\5      r " S S	\5      r " S
 S\\5      r " S S\5      r	g)c                   ó   • \ rS rSrSrSrg)ÚOptunaErroré   z&Base class for Optuna specific errors.© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    ÚŸC:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\optuna/exceptions.pyr   r      s   † Ù0âr   r   c                   ó   • \ rS rSrSrSrg)ÚTrialPrunedé   aH  Exception for pruned trials.

This error tells a trainer that the current :class:`~optuna.trial.Trial` was pruned. It is
supposed to be raised after :func:`optuna.trial.Trial.should_prune` as shown in the following
example.

See also:
    :class:`optuna.TrialPruned` is an alias of :class:`optuna.exceptions.TrialPruned`.

Example:

    .. testcode::

        import numpy as np
        from sklearn.datasets import load_iris
        from sklearn.linear_model import SGDClassifier
        from sklearn.model_selection import train_test_split

        import optuna

        X, y = load_iris(return_X_y=True)
        X_train, X_valid, y_train, y_valid = train_test_split(X, y)
        classes = np.unique(y)


        def objective(trial):
            alpha = trial.suggest_float("alpha", 0.0, 1.0)
            clf = SGDClassifier(alpha=alpha)
            n_train_iter = 100

            for step in range(n_train_iter):
                clf.partial_fit(X_train, y_train, classes=classes)

                intermediate_value = clf.score(X_valid, y_valid)
                trial.report(intermediate_value, step)

                if trial.should_prune():
                    raise optuna.TrialPruned()

            return clf.score(X_valid, y_valid)


        study = optuna.create_study(direction="maximize")
        study.optimize(objective, n_trials=20)
r   Nr   r   r   r   r   r      s   † ñ,ò\ 	r   r   c                   ó   • \ rS rSrSrSrg)ÚCLIUsageErroré9   zVException for CLI.

CLI raises this exception when it receives invalid configuration.
r   Nr   r   r   r   r   r   9   ó   † ñò
 	r   r   c                   ó   • \ rS rSrSrSrg)ÚStorageInternalErroréB   zjException for storage operation.

This error is raised when an operation failed in backend DB of storage.
r   Nr   r   r   r   r   r   B   r   r   r   c                   ó   • \ rS rSrSrSrg)ÚDuplicatedStudyErroréK   zxException for a duplicated study name.

This error is raised when a specified study name already exists in the storage.
r   Nr   r   r   r   r   r   K   r   r   r   c                   ó   • \ rS rSrSrSrg)ÚUpdateFinishedTrialErroréT   zkException for updating a finished trial.

This error is raised when attempting to update a finished trial.
r   Nr   r   r   r   r   r   T   r   r   r   c                   ó   • \ rS rSrSrSrg)ÚExperimentalWarningé]   zêExperimental Warning class.

This implementation exists here because the policy of `FutureWarning` has been changed
since Python 3.7 was released. See the details in
https://docs.python.org/3/library/warnings.html#warning-categories.
r   Nr   r   r   r   r    r    ]   s   † ñò 	r   r    N)
Ú	Exceptionr   r   r   r   r   ÚRuntimeErrorr   ÚWarningr    r   r   r   Ú<module>r%      s\   ðô	�)ô 	ô/	�+ô /	ôd	�Kô 	ô	˜;ô 	ô	˜;ô 	ô	˜{¨Lô 	ô	˜'õ 	r   