davechallis / rust-xgboost

Rust bindings for XGBoost.
MIT License
102 stars 37 forks source link

Update XGBoost 1.4.2 #14

Closed vaaaaanquish closed 2 years ago

vaaaaanquish commented 2 years ago

@davechallis @jonathanstrong Hi.

Overview

Requires

This PR requires the following merge

Confirmed that example/runall.sh is working.

$ head xgboost-sys/xgboost/NEWS.md
XGBoost Change Log
==================

This file records the changes in xgboost library in reverse chronological order.

## v1.4.2 (2021.05.13)

$ ./runall.sh
...
Compiling xgboost-sys v0.2.0 (/app/rust-xgboost/xgboost-sys)
...

Description

vaaaaanquish commented 2 years ago

@davechallis @jonathanstrong Hi.

Please review this PR and https://github.com/davechallis/xgboost/pull/1

I've prepared a Dockerfile to run these.

FROM rust

WORKDIR /app
RUN apt update &&\
    rm -rf ~/.cache &&\
    apt clean all
RUN apt install -y cmake libclang-dev libc++-dev gcc-multilib libssl-dev

RUN git clone --recursive https://github.com/vaaaaanquish/rust-xgboost.git
RUN cd rust-xgboost &&\
    git checkout release_1.4.2 &&\
    cd xgboost-sys/xgboost &&\
    git remote add upstream https://github.com/vaaaaanquish/xgboost.git &&\
    git fetch upstream &&\
    git submodule deinit -f rabit &&\
    git rm -f rabit &&\
    git stash &&\
    git checkout upstream/release_1.4.2 &&\
    cd dmlc-core &&\
    git pull origin master
RUN sed -i -e 's/xgboost-sys.*/xgboost-sys\={path\="\.\/xgboost-sys"}/g' /app/rust-xgboost/Cargo.toml

WORKDIR /app/rust-xgboost
ENTRYPOINT [ "/bin/bash" ]

It works with the following command :)

$ docker build -t example .
$ docker run -it example

# cargo test
# cd examples
# ./runall.sh