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
d5bbaa26
Commit
d5bbaa26
authored
Mar 27, 2017
by
wxchan
Committed by
Qiwei Ye
Mar 27, 2017
Browse files
fix getstate in _InnerPredictor (#366)
parent
0dbc421a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
python-package/lightgbm/basic.py
python-package/lightgbm/basic.py
+5
-0
No files found.
python-package/lightgbm/basic.py
View file @
d5bbaa26
...
...
@@ -343,6 +343,11 @@ class _InnerPredictor(object):
if
self
.
__is_manage_handle
:
_safe_call
(
_LIB
.
LGBM_BoosterFree
(
self
.
handle
))
def
__getstate__
(
self
):
this
=
self
.
__dict__
.
copy
()
this
.
pop
(
'handle'
,
None
)
return
this
def
predict
(
self
,
data
,
num_iteration
=-
1
,
raw_score
=
False
,
pred_leaf
=
False
,
data_has_header
=
False
,
is_reshape
=
True
):
...
...
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