python package refactor into python-package
This commit is contained in:
@@ -1,20 +1,9 @@
|
||||
Wrapper of XGBoost
|
||||
=====
|
||||
This folder provides wrapper of xgboost to other languages
|
||||
XGBoost Wrappers
|
||||
================
|
||||
This folder provides wrapper to create xgboost packages to other languages.
|
||||
|
||||
Python
|
||||
=====
|
||||
* To make the python module, type ```./build.sh``` in the root directory of project
|
||||
* Make sure you have [setuptools](https://pypi.python.org/pypi/setuptools)
|
||||
* Install with `python setup.py install` from this directory.
|
||||
* Refer also to the walk through example in [demo folder](../demo/guide-python)
|
||||
* **NOTE**: if you want to run XGBoost process in parallel using the fork backend for joblib/multiprocessing, you must build XGBoost without support for OpenMP by `make no_omp=1`. Otherwise, use the forkserver (in Python 3.4) or spawn backend. See the sklearn_parallel.py demo.
|
||||
|
||||
|
||||
R
|
||||
=====
|
||||
* See [R-package](../R-package)
|
||||
|
||||
Julia
|
||||
=====
|
||||
* See [XGBoost.jl](https://github.com/antinucleon/XGBoost.jl)
|
||||
***Supported Language Packages***
|
||||
* [Python package](../python-package)
|
||||
* [R-package](../R-package)
|
||||
* [Java Package](../java)
|
||||
* [Julia Package](https://github.com/antinucleon/XGBoost.jl)
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# pylint: disable=invalid-name
|
||||
"""Setup xgboost package."""
|
||||
import os
|
||||
import platform
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
class XGBoostLibraryNotFound(Exception):
|
||||
"""Exception to raise when xgboost library cannot be found."""
|
||||
pass
|
||||
|
||||
|
||||
curr_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
dll_path = [curr_dir]
|
||||
|
||||
if os.name == 'nt':
|
||||
if platform.architecture()[0] == '64bit':
|
||||
dll_path.append(os.path.join(curr_dir, '../windows/x64/Release/'))
|
||||
else:
|
||||
dll_path.append(os.path.join(curr_dir, '../windows/Release/'))
|
||||
|
||||
|
||||
if os.name == 'nt':
|
||||
dll_path = [os.path.join(p, 'xgboost_wrapper.dll') for p in dll_path]
|
||||
else:
|
||||
dll_path = [os.path.join(p, 'libxgboostwrapper.so') for p in dll_path]
|
||||
|
||||
lib_path = [p for p in dll_path if os.path.exists(p) and os.path.isfile(p)]
|
||||
|
||||
if len(lib_path) == 0:
|
||||
raise XGBoostLibraryNotFound("XGBoost library not found. Did you run "
|
||||
"../make?")
|
||||
setup(name="xgboost",
|
||||
version="0.40",
|
||||
description="Python wrappers for XGBoost: eXtreme Gradient Boosting",
|
||||
zip_safe=False,
|
||||
py_modules=['xgboost'],
|
||||
data_files=[('.', [lib_path[0]])],
|
||||
url="https://github.com/dmlc/xgboost")
|
||||
1304
wrapper/xgboost.py
1304
wrapper/xgboost.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user