optuna.structs¶
This module is deprecated, with former functionality moved to optuna.trial and optuna.study.
-
class
optuna.structs.TrialState(value)[source]¶ State of a
Trial.-
PRUNED¶ The
Trialhas been pruned withTrialPruned.
Deprecated since version 1.4.0: This class is deprecated. Please use
TrialStateinstead.-
-
class
optuna.structs.StudyDirection(value)[source]¶ Direction of a
Study.-
NOT_SET¶ Direction has not been set.
Deprecated since version 1.4.0: This class is deprecated. Please use
StudyDirectioninstead.-
-
class
optuna.structs.FrozenTrial(number: int, state: optuna.trial._state.TrialState, value: Optional[float], datetime_start: Optional[datetime.datetime], datetime_complete: Optional[datetime.datetime], params: Dict[str, Any], distributions: Dict[str, optuna.distributions.BaseDistribution], user_attrs: Dict[str, Any], system_attrs: Dict[str, Any], intermediate_values: Dict[int, float], trial_id: int, *, values: Optional[Sequence[float]] = None)[source]¶ Warning
Deprecated in v1.4.0. This feature will be removed in the future. The removal of this feature is currently scheduled for v3.0.0, but this schedule is subject to change. See https://github.com/optuna/optuna/releases/tag/v1.4.0.
This class was moved to
trial. Please useFrozenTrialinstead.-
property
distributions¶ Dictionary that contains the distributions of
params.
-
property
duration¶ Return the elapsed time taken to complete the trial.
- Returns
The duration.
-
property
last_step¶ Return the maximum step of intermediate_values in the trial.
- Returns
The maximum step of intermediates.
-
report(value: float, step: int) → None[source]¶ Interface of report function.
Since
FrozenTrialis not pruned, this report function does nothing.See also
Please refer to
should_prune().- Parameters
value – A value returned from the objective function.
step – Step of the trial (e.g., Epoch of neural network training). Note that pruners assume that
stepstarts at zero. For example,MedianPrunersimply checks ifstepis less thann_warmup_stepsas the warmup mechanism.
-
property
-
class
optuna.structs.StudySummary(study_name: str, direction: Optional[optuna._study_direction.StudyDirection], best_trial: Optional[optuna.trial._frozen.FrozenTrial], user_attrs: Dict[str, Any], system_attrs: Dict[str, Any], n_trials: int, datetime_start: Optional[datetime.datetime], study_id: int, *, directions: Optional[Sequence[optuna._study_direction.StudyDirection]] = None)[source]¶ Warning
Deprecated in v1.4.0. This feature will be removed in the future. The removal of this feature is currently scheduled for v3.0.0, but this schedule is subject to change. See https://github.com/optuna/optuna/releases/tag/v1.4.0.
This class was moved to
study. Please useStudySummaryinstead.