Skip to content

Commit

Permalink
few more minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nzw0301 committed Jan 29, 2025
1 parent fc5b81d commit cc5467d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions optuna_integration/pytorch_lightning/pytorch_lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions optuna_integration/shap/shap.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class ShapleyImportanceEvaluator(BaseImportanceEvaluator):
This evaluator requires the `sklearn <https://scikit-learn.org/stable/>`_ Python package
and `SHAP <https://shap.readthedocs.io/en/stable/index.html>`_.
The model for the SHAP calculation is based on `sklearn.ensemble.RandomForestClassifier
<https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html>`_.
The model for the SHAP calculation is based on :class:`sklearn.ensemble.RandomForestClassifier`.
Args:
n_trees:
Expand Down
4 changes: 2 additions & 2 deletions optuna_integration/sklearn/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit cc5467d

Please sign in to comment.