docs.rs failed to build lightgbm3-1.0.6
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
lightgbm3-1.0.8
lightgbm3 — Rust bindings for LightGBM
lightgbm3
is based on lightgbm
(which is unsupported by now), but it is not back-compatible with it.
Installation
cargo add lightgbm3
Since lightgbm3
compiles LightGBM
from source, you also need to install development libraries:
for Linux:
apt install -y cmake clang libclang-dev libc++-dev gcc-multilib
for Mac:
brew install cmake
brew install libomp # only required if you compile with "openmp" feature
for Windows
- Install CMake and VS Build Tools.
- Install LLVM and set
LIBCLANG_PATH
environment variable (i.e.C:\Program Files\LLVM\bin
)
Please see below for details.
Usage
Training:
use ;
use json;
let features = vec!;
let labels = vec!;
let dataset = from_vec_of_vec.unwrap;
let params = json!;
let bst = train.unwrap;
bst.save_file.unwrap;
Inference:
use ;
let bst = from_file.unwrap;
let features = vec!;
let n_features = features.len;
let y_pred = bst.predict_with_params.unwrap;
Look in the ./examples/
folder for more details:
Features
lightgbm3
supports the following features:
polars
for polars supportopenmp
for multi-processing supportgpu
for GPU supportcuda
for CUDA support
Benchmarks
cargo bench
Add --features=openmp
, --features=gpu
and --features=cuda
appropriately.
Development
git clone --recursive https://github.com/Mottl/lightgbm3-rs.git
Thanks
Great respect to vaaaaanquish for the LightGBM Rust package, which unfortunately no longer supported.
Much reference was made to implementation and documentation. Thanks.