guitargeek / XGBoost-FastForest

Minimal library code to deploy XGBoost models in C++.
MIT License
89 stars 30 forks source link

add ability to load from std::istream #14

Closed hgminh95 closed 3 years ago

hgminh95 commented 3 years ago

Add 2 new functions

FastForest load_txt(std::istream& is, std::vector<std::string>& features);
FastForest load_bin(std::istream& is);

Haven't figured out how to create and run test yet. If you can help on it, it would be helpful.

guitargeek commented 3 years ago

Hi, thanks for the contribution, LGTM! There is no need to create a new test, because the new ifstream functions are used by the existing functions that take filenames, and these are already tested. If you want to figure out how to run the tests yourself, you can have a look at the travis configuration file and follow the steps there.

I ran the tests locally and it works all fine! I don't know what's wrong with the Travis build, I got to investigate that later.

I hope the fastforest library is useful to you!

Cheers, Jonas