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
90a4510c
Unverified
Commit
90a4510c
authored
Mar 09, 2023
by
IdoKendo
Committed by
GitHub
Mar 09, 2023
Browse files
[python-package] fix mypy errors about missing annotations and incompatible types (#5672)
parent
f585eafa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
python-package/lightgbm/callback.py
python-package/lightgbm/callback.py
+4
-4
No files found.
python-package/lightgbm/callback.py
View file @
90a4510c
...
@@ -254,10 +254,10 @@ class _EarlyStoppingCallback:
...
@@ -254,10 +254,10 @@ class _EarlyStoppingCallback:
self
.
_reset_storages
()
self
.
_reset_storages
()
def
_reset_storages
(
self
)
->
None
:
def
_reset_storages
(
self
)
->
None
:
self
.
best_score
=
[]
self
.
best_score
:
List
[
float
]
=
[]
self
.
best_iter
=
[]
self
.
best_iter
:
List
[
int
]
=
[]
self
.
best_score_list
=
[]
self
.
best_score_list
:
List
[
Union
[
_EvalResultTuple
,
None
]]
=
[]
self
.
cmp_op
=
[]
self
.
cmp_op
:
List
[
Callable
[[
float
,
float
],
bool
]]
=
[]
self
.
first_metric
=
''
self
.
first_metric
=
''
def
_gt_delta
(
self
,
curr_score
:
float
,
best_score
:
float
,
delta
:
float
)
->
bool
:
def
_gt_delta
(
self
,
curr_score
:
float
,
best_score
:
float
,
delta
:
float
)
->
bool
:
...
...
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