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
958d78d8
Commit
958d78d8
authored
Jun 28, 2017
by
Guolin Ke
Browse files
fix #655
parent
f3d5c9d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
python-package/lightgbm/__init__.py
python-package/lightgbm/__init__.py
+5
-2
python-package/setup.py
python-package/setup.py
+2
-3
No files found.
python-package/lightgbm/__init__.py
View file @
958d78d8
...
...
@@ -3,13 +3,13 @@
Contributors: https://github.com/Microsoft/LightGBM/graphs/contributors
"""
from
__future__
import
absolute_import
from
.basic
import
Booster
,
Dataset
from
.callback
import
(
early_stopping
,
print_evaluation
,
record_evaluation
,
reset_parameter
)
from
.engine
import
cv
,
train
import
os
try
:
from
.sklearn
import
LGBMModel
,
LGBMRegressor
,
LGBMClassifier
,
LGBMRanker
...
...
@@ -20,8 +20,11 @@ try:
except
ImportError
:
pass
version
=
'2.0.1'
if
os
.
path
.
isfile
(
'./VERSION.txt'
):
version
=
open
(
'./VERSION.txt'
).
read
().
strip
()
__version__
=
0.2
__version__
=
version
__all__
=
[
'Dataset'
,
'Booster'
,
'train'
,
'cv'
,
...
...
python-package/setup.py
View file @
958d78d8
...
...
@@ -32,6 +32,8 @@ if __name__ == "__main__":
sys
.
argv
=
sys
.
argv
[
0
:
2
]
except
getopt
.
GetoptError
as
err
:
pass
if
os
.
path
.
isfile
(
'../VERSION.txt'
):
distutils
.
file_util
.
copy_file
(
"../VERSION.txt"
,
"./lightgbm/"
)
if
not
use_precompile
or
build_sdist
:
if
not
os
.
path
.
isfile
(
'./_IS_SOURCE_PACKAGE.txt'
):
if
os
.
path
.
exists
(
"../include"
):
...
...
@@ -54,7 +56,6 @@ if __name__ == "__main__":
else
:
raise
Exception
(
'Cannot copy ../compute folder'
)
distutils
.
file_util
.
copy_file
(
"../CMakeLists.txt"
,
"./lightgbm/"
)
distutils
.
file_util
.
copy_file
(
"../VERSION.txt"
,
"./lightgbm/"
)
if
build_sdist
:
file_flag
=
open
(
"./_IS_SOURCE_PACKAGE.txt"
,
'w'
)
file_flag
.
close
()
...
...
@@ -102,8 +103,6 @@ if __name__ == "__main__":
version
=
'2.0.1'
if
os
.
path
.
isfile
(
'./lightgbm/VERSION.txt'
):
version
=
open
(
'./lightgbm/VERSION.txt'
).
read
().
strip
()
elif
os
.
path
.
isfile
(
'../VERSION.txt'
):
version
=
open
(
'../VERSION.txt'
).
read
().
strip
()
setup
(
name
=
'lightgbm'
,
version
=
version
,
description
=
'LightGBM Python Package'
,
...
...
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