- 20 Mar, 2020 1 commit
-
-
Alberto Ferreira authored
* [swig] Fix SWIG methods that return char** with StringArray. + [new] Add StringArray class to manage and manipulate arrays of fixed-length strings: This class is now used to wrap any char** parameters, manage memory and manipulate the strings. Such class is defined at swig/StringArray.hpp and wrapped in StringArray.i. + [API+fix] Wrap LGBM_BoosterGetFeatureNames it resulted in segfault before: Added wrapper LGBM_BoosterGetFeatureNamesSWIG(BoosterHandle) that only receives the booster handle and figures how much memory to allocate for strings and returns a StringArray which can be easily converted to String[]. + [API+safety] For consistency, LGBM_BoosterGetEvalNamesSWIG was wrapped as well: * Refactor to detect any kind of errors and removed all the parameters besides the BoosterHandle (much simpler API to use in Java). * No assumptions are made about the required string space necessary (128 before). * The amount of required string memory is computed internally + [safety] No possibility of undefined behaviour The two methods wrapped above now compute the necessary string storage space prior to allocation, as the low-level C API calls would crash the process irreversibly if they write more memory than which is passed to them. * Changes to C API and wrappers support char** To support the latest SWIG changes that enable proper char** return support that is safe, the C API was changed. The respecive wrappers in R and Python were changed too. * Cleanup indentation in new lightgbm_R.cpp code * Adress review code-style comments. * Update swig/StringArray.hpp Co-Authored-By:Nikita Titov <nekit94-08@mail.ru> * Update python-package/lightgbm/basic.py Co-Authored-By:
Nikita Titov <nekit94-08@mail.ru> * Update src/lightgbm_R.cpp Co-Authored-By:
Nikita Titov <nekit94-08@mail.ru> Co-authored-by:
alberto.ferreira <alberto.ferreira@feedzai.com> Co-authored-by:
Nikita Titov <nekit94-08@mail.ru>
-
- 13 Nov, 2019 1 commit
-
-
Joan Fontanals authored
[Java] MMLSPARK-ISSUE-720 - Create SWIG version of BoosterDumpModel that returns string to be used in Java (#2560)
-
- 26 Sep, 2019 1 commit
-
-
Ilya Matiach authored
* add missing JNI exception checks to fix warnings * updated based on comments * removed rethrow logic * replace tabs with spaces
-
- 30 Aug, 2019 1 commit
-
-
Ilya Matiach authored
-
- 25 Jul, 2019 1 commit
-
-
Nikita Titov authored
-
- 04 May, 2019 1 commit
-
-
Ilya Matiach authored
-
- 29 Apr, 2019 1 commit
-
-
Ilya Matiach authored
* added typemap for string arrays in SWIG interface * added voidp pointer casts
-
- 18 Mar, 2019 1 commit
-
-
Markus Cozowicz authored
* added API changes required for JNI performance optimizations (e.g. predict is 3-4x faster) * removed commented variables * removed commented header * renamed method to make it obvious it is created for Spark * fixed comment alignment * replaced GetPrimitiveArrayCritical with GetIntArrayElements for training. fixed dead-lock on databricks
-
- 16 Mar, 2019 1 commit
-
-
Ilya Matiach authored
* lightgbm SWIG Java wrapper changes needed to add early stopping in mmlspark * updated based on comments
-
- 25 Aug, 2018 1 commit
-
-
Ilya Matiach authored
-
- 31 Jan, 2018 1 commit
-
-
Ilya Matiach authored
* Adding Java wrappers to LightGBM by updating CMakeLists and adding SWIG file * Set SWIG generation to OFF by default * Added -package option to SWIG_FLAGS * Fixed jar structure to have class files in proper location * removed link with OpenMP flags
-