diff --git a/optuna_integration/pytorch_lightning/pytorch_lightning.py b/optuna_integration/pytorch_lightning/pytorch_lightning.py index b2cf3a92..c2b68772 100644 --- a/optuna_integration/pytorch_lightning/pytorch_lightning.py +++ b/optuna_integration/pytorch_lightning/pytorch_lightning.py @@ -52,7 +52,7 @@ class PyTorchLightningPruningCallback(Callback): .. note:: If you would like to use PyTorchLightningPruningCallback in a distributed training - environment, you need to evoke `PyTorchLightningPruningCallback.check_pruned()` + environment, you need to evoke ``PyTorchLightningPruningCallback.check_pruned()`` manually so that :class:`~optuna.exceptions.TrialPruned` is properly handled. """ @@ -148,7 +148,7 @@ def check_pruned(self) -> None: """Raise :class:`optuna.TrialPruned` manually if pruned. Currently, ``intermediate_values`` are not properly propagated between processes due to - storage cache. Therefore, necessary information is kept in trial_system_attrs when the + storage cache. Therefore, necessary information is kept in ``trial.system_attrs`` when the trial runs in a distributed situation. Please call this method right after calling ``lightning.pytorch.Trainer.fit()``. If a callback doesn't have any backend storage for DDP, this method does nothing. diff --git a/optuna_integration/shap/shap.py b/optuna_integration/shap/shap.py index d20d5d13..cccbdb2c 100644 --- a/optuna_integration/shap/shap.py +++ b/optuna_integration/shap/shap.py @@ -34,8 +34,7 @@ class ShapleyImportanceEvaluator(BaseImportanceEvaluator): This evaluator requires the `sklearn `_ Python package and `SHAP `_. - The model for the SHAP calculation is based on `sklearn.ensemble.RandomForestClassifier - `_. + The model for the SHAP calculation is based on :class:`sklearn.ensemble.RandomForestClassifier`. Args: n_trees: diff --git a/optuna_integration/sklearn/sklearn.py b/optuna_integration/sklearn/sklearn.py index dab346ef..6818ba07 100644 --- a/optuna_integration/sklearn/sklearn.py +++ b/optuna_integration/sklearn/sklearn.py @@ -153,7 +153,7 @@ class _Objective: error_score: Value to assign to the score if an error occurs in fitting. If - 'raise', the error is raised. If numeric, + ``"raise"``, the error is raised. If numeric, :class:`sklearn.exceptions.FitFailedWarning` is raised. This does not affect the refit step, which will always raise the error. @@ -429,7 +429,7 @@ class OptunaSearchCV(BaseEstimator): error_score: Value to assign to the score if an error occurs in fitting. If - 'raise', the error is raised. If numeric, + ``"raise"``, the error is raised. If numeric, :class:`sklearn.exceptions.FitFailedWarning` is raised. This does not affect the refit step, which will always raise the error.