Skip to content

Commit

Permalink
Merge pull request #5167 from Alnusjaponica/fix-checks-integration
Browse files Browse the repository at this point in the history
Fix `Checks(integration)` failure
  • Loading branch information
not522 committed Dec 26, 2023
2 parents 7a30780 + c4cf2f5 commit a8e6ead
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion optuna/integration/lightgbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

if TYPE_CHECKING:
from lightgbm.basic import _LGBM_BoosterEvalMethodResultType
from lightgbm.basic import _LGBM_BoosterEvalMethodResultWithStandardDeviationType
from lightgbm.callback import CallbackEnv


Expand Down Expand Up @@ -94,7 +95,11 @@ def __init__(

def _find_evaluation_result(
self, target_valid_name: str, env: CallbackEnv
) -> _LGBM_BoosterEvalMethodResultType | None:
) -> (
_LGBM_BoosterEvalMethodResultType
| _LGBM_BoosterEvalMethodResultWithStandardDeviationType
| None
):
evaluation_result_list = env.evaluation_result_list
if evaluation_result_list is None:
return None
Expand Down

0 comments on commit a8e6ead

Please sign in to comment.