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
742d72f8
Unverified
Commit
742d72f8
authored
Nov 15, 2020
by
Nikita Titov
Committed by
GitHub
Nov 14, 2020
Browse files
mark 3.1 version is the last one with Python 2 support (#3565)
parent
c20cce04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
python-package/lightgbm/__init__.py
python-package/lightgbm/__init__.py
+7
-0
No files found.
python-package/lightgbm/__init__.py
View file @
742d72f8
...
...
@@ -11,6 +11,8 @@ from .callback import (early_stopping, print_evaluation, record_evaluation,
from
.engine
import
cv
,
train
,
CVBooster
import
os
import
sys
import
warnings
try
:
from
.sklearn
import
LGBMModel
,
LGBMRegressor
,
LGBMClassifier
,
LGBMRanker
...
...
@@ -34,3 +36,8 @@ __all__ = ['Dataset', 'Booster', 'CVBooster',
'LGBMModel'
,
'LGBMRegressor'
,
'LGBMClassifier'
,
'LGBMRanker'
,
'print_evaluation'
,
'record_evaluation'
,
'reset_parameter'
,
'early_stopping'
,
'plot_importance'
,
'plot_split_value_histogram'
,
'plot_metric'
,
'plot_tree'
,
'create_tree_digraph'
]
# REMOVEME: remove warning after 3.1.0 version release
if
sys
.
version_info
[
0
]
==
2
:
warnings
.
warn
(
"LightGBM 3.1 version is the last version that supports Python 2.
\n
"
"Next release will drop the support."
,
UserWarning
)
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