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
179564df
Unverified
Commit
179564df
authored
Aug 07, 2022
by
James Lamb
Committed by
GitHub
Aug 07, 2022
Browse files
[python-package] add type hints on `Booster.save_model()` (#5406)
parent
c7102e56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+7
-1
No files found.
python-package/lightgbm/basic.py
View file @
179564df
...
@@ -3352,7 +3352,13 @@ class Booster:
...
@@ -3352,7 +3352,13 @@ class Booster:
return
[
item
for
i
in
range
(
1
,
self
.
__num_dataset
)
return
[
item
for
i
in
range
(
1
,
self
.
__num_dataset
)
for
item
in
self
.
__inner_eval
(
self
.
name_valid_sets
[
i
-
1
],
i
,
feval
)]
for
item
in
self
.
__inner_eval
(
self
.
name_valid_sets
[
i
-
1
],
i
,
feval
)]
def
save_model
(
self
,
filename
,
num_iteration
=
None
,
start_iteration
=
0
,
importance_type
=
'split'
):
def
save_model
(
self
,
filename
:
Union
[
str
,
Path
],
num_iteration
:
Optional
[
int
]
=
None
,
start_iteration
:
int
=
0
,
importance_type
:
str
=
'split'
)
->
"Booster"
:
"""Save Booster to file.
"""Save Booster to file.
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