Commits


Joan Fontanals authored and GitHub committed 1c35c3b9ede
Change locking strategy of Booster, allow for share and unique locks (#2760) * Add capability to get possible max and min values for a model * Change implementation to have return value in tree.cpp, change naming to upper and lower bound, move implementation to gdbt.cpp * Update include/LightGBM/c_api.h Co-Authored-By: Nikita Titov <nekit94-08@mail.ru> * Change iteration to avoid potential overflow, add bindings to R and Python and a basic test * Adjust test values * Consider const correctness and multithreading protection * Put everything possible as const * Include shared_mutex, for now as unique_lock * Update test values * Put everything possible as const * Include shared_mutex, for now as unique_lock * Make PredictSingleRow const and share the lock with other reading threads * Update test values * Add test to check that model is exactly the same in all platforms * Try to parse the model to get the expected values * Try to parse the model to get the expected values * Fix implementation, num_leaves can be lower than the leaf_value_ size * Do not check for num_leaves to be smaller than actual size and get back to test with hardcoded value * Change test order * Add gpu_use_dp option in test * Remove helper test method * Remove TODO * Add preprocessing option to compile with c++17 * Update python-package/setup.py Co-Authored-By: Nikita Titov <nekit94-08@mail.ru> * Remove unwanted changes * Move option * Fix problems introduced by conflict fix * Avoid switching to c++17 and use yamc mutex library to access shared lock functionality * Add extra yamc include * Change header order * some lint fix * change include order and remove some extra blank lines * Further fix lint issues * Update c_api.cpp * Further fix lint issues * Move yamc include files to a new yamc folder * Use standard unique_lock * Update windows/LightGBM.vcxproj Co-authored-by: Guolin Ke <guolin.ke@outlook.com> * Update windows/LightGBM.vcxproj.filters Co-authored-by: Guolin Ke <guolin.ke@outlook.com> * Update windows/LightGBM.vcxproj.filters Co-authored-by: Nikita Titov <nekit94-08@mail.ru> * Update windows/LightGBM.vcxproj.filters Co-authored-by: Nikita Titov <nekit94-08@mail.ru> * Update windows/LightGBM.vcxproj.filters Co-authored-by: Nikita Titov <nekit94-08@mail.ru> * Fix problems coming from merge conflict resolution Co-authored-by: Nikita Titov <nekit94-08@mail.ru> Co-authored-by: joanfontanals <jfontanals@ntent.com> Co-authored-by: Guolin Ke <guolin.ke@outlook.com>