[DRAFT] Restructuring code to include LightGBM as a dependency#57
[DRAFT] Restructuring code to include LightGBM as a dependency#57reluzita wants to merge 16 commits into
Conversation
TaiPee
left a comment
There was a problem hiding this comment.
Tested the build and ran the tests. A couple of notes on what was needed to get everything working:
Installing dependencies
The dev extras need to be installed explicitly since hypothesis (used by most of the test files) is
under [project.optional-dependencies]:
pip install -e ".[dev]"
Placing lib_fairgbm.so where Python can find it
Running cmake .. && make -j4 in native/build/ compiles successfully, but the .so ends up in
native/build/ rather than the fairgbm/ package directory where _lib.py looks for it. Using pip install
-e ".[dev]" handles both the build and placement in one step. Alternatively, a manual copy works too:
cp native/build/lib_fairgbm.so fairgbm/
With those two things in place, all 19 tests pass.
- Add Microsoft LightGBM v3.2.1 as git submodule at vendor/LightGBM - Add root CMakeLists.txt that patches LightGBM with FairGBM extensions and builds - Add swig/ directory for Java JNI bindings - Compatible with feedzai-openml-java build pipeline (no changes needed there)
…n Java build When building inside full LightGBM (Java build), FairGBM::Config becomes a typedef for LightGBM::Config. Also re-added strs constructor overloads for model loading compatibility.
To run tests:
pytest tests/test_cmake_build.py tests/test_constrained_objectives.py tests/test_num_constraints.py tests/test_proxy_loss_effect.pyTo compile C code: