Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
f136de41
Unverified
Commit
f136de41
authored
Feb 16, 2023
by
James Lamb
Committed by
GitHub
Feb 16, 2023
Browse files
[python-package] fix mypy errors about custom eval functions in sklearn.py (#5721)
parent
74316c11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
python-package/lightgbm/sklearn.py
python-package/lightgbm/sklearn.py
+5
-1
No files found.
python-package/lightgbm/sklearn.py
View file @
f136de41
...
@@ -178,7 +178,11 @@ class _EvalFunctionWrapper:
...
@@ -178,7 +178,11 @@ class _EvalFunctionWrapper:
"""
"""
self
.
func
=
func
self
.
func
=
func
def
__call__
(
self
,
preds
:
np
.
ndarray
,
dataset
:
Dataset
)
->
Tuple
[
str
,
float
,
bool
]:
def
__call__
(
self
,
preds
:
np
.
ndarray
,
dataset
:
Dataset
)
->
Union
[
_LGBM_EvalFunctionResultType
,
List
[
_LGBM_EvalFunctionResultType
]]:
"""Call passed function with appropriate arguments.
"""Call passed function with appropriate arguments.
Parameters
Parameters
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment