* lightgbm version update to 4.1.0

* update ci

* remove loading

* fix

* copying so files to compile folder

* change path of precompiled libs

* change path

---------

Co-authored-by: Manisha Dhingra <madhin@microsoft.com>
This commit is contained in:
Manisha Dhingra 2023-11-15 13:49:54 +05:30 коммит произвёл GitHub
Родитель 1d7d342659
Коммит 9d5d0e3e10
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -6,9 +6,9 @@ mkdir build
# precompile mpi option.
cd build && cmake ../ -DUSE_MPI=ON && make -j4 && cd ../ || exit -1
# copy all shared libs to lightgbm python package directory.
cp ./lib_custom_parser.so ${lgb_python_pkg_dir}/lightgbm && \
cp ./src/lib_transform.so ${lgb_python_pkg_dir}/lightgbm && \
cp ./external_libs/LightGBM/lib_lightgbm.so ${lgb_python_pkg_dir}/lightgbm || exit -1
cp ./lib_custom_parser.so ${lgb_python_pkg_dir}/ && \
cp ./src/lib_transform.so ${lgb_python_pkg_dir}/ && \
cp ./external_libs/LightGBM/lib_lightgbm.so ${lgb_python_pkg_dir}/ || exit -1
# modify `basic.py` to load all libs first, or cannot find them when calling python interfaces.
cp ${lgb_python_pkg_dir}/lightgbm/basic.py raw && cat ./scripts/load_precompiled_libs.py ${lgb_python_pkg_dir}/lightgbm/basic.py > tmp && cp tmp ${lgb_python_pkg_dir}/lightgbm/basic.py || exit -1
# install python package

Просмотреть файл

@ -1 +1 @@
3.3.2
4.1.0

@ -1 +1 @@
Subproject commit 865c126a1e3ccdd77ec205b9dde46e5f3c5b6b21
Subproject commit 501ce1cb63e39c67ceb93a063662f3d9867e044c

Просмотреть файл

@ -3,4 +3,4 @@ from pathlib import Path
CUSTOM_PARSER_LIB_NAME = 'lib_custom_parser.so'
for p in ['lib_transform.so', 'lib_lightgbm.so', CUSTOM_PARSER_LIB_NAME]:
ctypes.cdll.LoadLibrary(str(Path(__file__).resolve().parent / p))
ctypes.cdll.LoadLibrary(str(Path(__file__).resolve().parents[1] / p))

Просмотреть файл

@ -5,13 +5,13 @@ mkdir build
# precompile mpi option.
cd build && cmake ../ -DUSE_MPI=ON && make -j4 && cd ../ || exit -1
# copy all shared libs to lightgbm python package directory.
cp ./lib_custom_parser.so ${lgb_python_pkg_dir}/lightgbm && \
cp ./src/lib_transform.so ${lgb_python_pkg_dir}/lightgbm && \
cp ./external_libs/LightGBM/lib_lightgbm.so ${lgb_python_pkg_dir}/lightgbm || exit -1
cp ./lib_custom_parser.so ${lgb_python_pkg_dir}/ && \
cp ./src/lib_transform.so ${lgb_python_pkg_dir}/ && \
cp ./external_libs/LightGBM/lib_lightgbm.so ${lgb_python_pkg_dir}/ || exit -1
# modify `basic.py` to load all libs first, or cannot find them when calling python interfaces.
cp ${lgb_python_pkg_dir}/lightgbm/basic.py raw && cat ./scripts/load_precompiled_libs.py ${lgb_python_pkg_dir}/lightgbm/basic.py > tmp && cp tmp ${lgb_python_pkg_dir}/lightgbm/basic.py || exit -1
mkdir compile
cp -r ${lgb_python_pkg_dir}/lightgbm ./compile/ && cp ${lgb_python_pkg_dir}/MANIFEST.in ./compile/ || exit -1
cp -r ${lgb_python_pkg_dir}/*.so ./compile/ && cp -r ${lgb_python_pkg_dir}/lightgbm ./compile/ && cp ${lgb_python_pkg_dir}/MANIFEST.in ./compile/ || exit -1
cp ./scripts/setup.py ./compile/ && cp ./scripts/README.rst ./compile && cp VERSION.txt ./compile || exit -1
# pack wheel package.
cd compile && python setup.py bdist_wheel --precompile && cd ../ || exit -1