Skip to content

Commit

Permalink
Update module path according to optuna#4669
Browse files Browse the repository at this point in the history
  • Loading branch information
Alnusjaponica committed May 18, 2023
1 parent 1240cd2 commit 95018ea
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/source/reference/terminator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The :mod:`~optuna.terminator` module implements a mechanism for automatically te
:toctree: generated/
:nosignatures:

optuna.terminator.terminator.Terminator
optuna.terminator.callback.TerminatorCallback
optuna.terminator.Terminator
optuna.terminator.TerminatorCallback
10 changes: 5 additions & 5 deletions optuna/terminator/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
class TerminatorCallback:
"""A callback that terminates the optimization using Terminator.
This class implements a callback which wraps :class:`~optuna.terminator.terminator.Terminator`
This class implements a callback which wraps :class:`~optuna.terminator.Terminator`
so that it can be used with the :func:`~optuna.study.Study.optimize` method.
Args:
terminator:
A terminator object which determines whether to terminate the optimization by
assessing the room for optimization and statistical error. Defaults to a
:class:`~optuna.terminator.terminator.Terminator` object with default
:class:`~optuna.terminator.Terminator` object with default
improvement_evaluator and error_evaluator.
Example:
Expand All @@ -35,8 +35,8 @@ class TerminatorCallback:
from sklearn.model_selection import KFold
import optuna
from optuna.terminator.callback import TerminatorCallback
from optuna.terminator.erroreval import report_cross_validation_scores
from optuna.terminator import TerminatorCallback
from optuna.terminator import report_cross_validation_scores
def objective(trial):
Expand All @@ -58,7 +58,7 @@ def objective(trial):
study.optimize(objective, n_trials=50, callbacks=[terminator])
.. seealso::
Please refer to :class:`~optuna.terminator.terminator.Terminator` for the details of
Please refer to :class:`~optuna.terminator.Terminator` for the details of
the terminator mechanism.
"""

Expand Down
8 changes: 4 additions & 4 deletions optuna/terminator/terminator.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Terminator(BaseTerminator):
:class:`~optuna.terminator.improvement.evaluator.RegretBoundEvaluator` object.
error_evaluator:
An evaluator for calculating the statistical error, e.g. cross-validation error.
Defaults to a :class:`~optuna.terminator.erroreval.CrossValidationErrorEvaluator`
Defaults to a :class:`~optuna.terminator.CrossValidationErrorEvaluator`
object.
min_n_trials:
The minimum number of trials before termination is considered. Defaults to ``20``.
Expand All @@ -57,8 +57,8 @@ class Terminator(BaseTerminator):
from sklearn.model_selection import KFold
import optuna
from optuna.terminator.terminator import Terminator
from optuna.terminator.erroreval import report_cross_validation_scores
from optuna.terminator import Terminator
from optuna.terminator import report_cross_validation_scores
study = optuna.create_study(direction="maximize")
Expand Down Expand Up @@ -88,7 +88,7 @@ class Terminator(BaseTerminator):
break
.. seealso::
Please refer to :class:`~optuna.terminator.callbacks.TerminationCallback` for how to use
Please refer to :class:`~optuna.terminator.TerminationCallback` for how to use
the terminator mechanism with the :func:`~optuna.study.Study.optimize` method.
"""
Expand Down

0 comments on commit 95018ea

Please sign in to comment.