Граф коммитов

1964 Коммитов

Автор SHA1 Сообщение Дата
James Lamb aa933eb427
[R-package] make package installable with CRAN toolchain (fixes #2960) (#3188)
* [R-package] make package installable with CRAN toolchain (fixes #2960)

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* remove GPU stuff

* use wildcard to find objects to build

* use -lomp

* build configure before moving files

* using wildcard for objects

* Update .github/workflows/main.yml

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* add explicit objects back

* reduce allowed R CMD check NOTEs and catch stderr from build-cran-package on Windows

* fixing things

* pin autoconf version

* show diff

* add automake back

* run less checks

* command was in the wrong place

* fix autoconf version

* change strategy for handling configure

* fix Rbuildignore

* fix NOTEs

* fix notes about unrecognized files

* fixing extra files

* remove USE_R35

* add OpenMP check for Mac CRAN build

* run all checks

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* suggestions from code review

* undo indenting

* remove 03 from Makevars.win.in

* update language about OpenMP in configure script

* checking if configure.ac check works

* add autoconf back

* remove testing code in configure.ac

* more fixes for CI on configure script

* print git diff

* add VERSION.txt when checking configure

* fix relative paths

* remove git diff

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-07-28 21:05:59 -05:00
Nikita Titov b299de3f72
improve params docs (#3252) 2020-07-27 10:24:59 +08:00
Guolin Ke 091f41b667
fix bug in CEGB when reset training data or config (#3246)
* fix

* Apply suggestions from code review
2020-07-25 18:05:36 +08:00
Guolin Ke e2f11b0533
fix possible problem in read number of columns from libsvm file. (#3242) 2020-07-25 18:05:17 +08:00
Nikita Titov 2c742d572e
[ci] partly remove macOS temp CI fix (#3251) 2020-07-24 17:40:44 +03:00
James Lamb f2589310fd
[R-package] remove duplicated test (#3250) 2020-07-24 16:23:48 +03:00
Ruifeng Zheng af51428982
init (#3248) 2020-07-23 09:21:30 -05:00
James Lamb 952e23a009
[R-package] Add tests on lgb.check.eval, lgb.unloader, and lgb.encode.char (#3235)
* [R-package] Add tests on lgb.check.eval, lgb.unloader, and lgb.encode.char

* remove accidental test file

* regenerated docs
2020-07-21 21:41:01 -05:00
James Lamb f257636d01
[ci] remove unnecessary R_CHECK_FORCE_SUGGESTS in CI scripts (#3240)
* [ci] remove unnecessary R_CHECK_FORCE_SUGGESTS in CI scripts

* remove unused test data
2020-07-20 20:12:10 +03:00
Guolin Ke 9d431d12c3
typo fix (#3239) 2020-07-20 19:03:24 +03:00
Nikita Titov 5056057348
[SWIG] removed commented code (#3233) 2020-07-20 20:33:57 +08:00
James Lamb 8e077e0d71
[R-package] add test on importance types (#3231)
* [R-package] add test on importance types

* linting
2020-07-20 20:33:07 +08:00
James Lamb 9f52282d0b
[R-package] factor out {ggplot2} (#3224)
* more changes

* factor out ggplot2

* update CI

* remove library()

* linting

* reduce NOTEs on Windows
2020-07-20 20:31:20 +08:00
shiyu1994 58b49dd8cd
set num_threads of share_state (fix #3151) (#3238)
Co-authored-by: Ubuntu <shiyu@gbdt-shiyu.ren3kv4wanvufliwrpy4k03lsf.xx.internal.cloudapp.net>
2020-07-19 09:05:34 +08:00
Joan Fontanals 1c35c3b9ed
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>
2020-07-19 03:44:14 +03:00
Jan Tilly f5f27ca88c
Upcast index to size_t in Refit (closes #3227) (#3228)
In the current implementation, the index is an int32, which will segfault with large data sets and a large number of estimators.
2020-07-16 15:19:20 +03:00
Alberto Ferreira fc79b36615
Feat/optimize single prediction (#2992)
* [performance] Add Fast methods to C API for SingleRow Predictions

 * Add methods to C API to make single-row predictions faster:

   - LGBM_BoosterPredictForMatSingleRowFastInit (setup)
   - LGBM_BoosterPredictForMatSingleRowFast (predict)
   - LGBM_FastConfigFree (cleanup setup outputs)

* Code syle cleanup

* Fix lint errors

* [performance] Revert FastConfig improvement to pass data at init

This reduces optimization by 5% / 30% with this branch but makes it so it can be used for higher level wrappers in MMLSpark.
And outside it as well.

* [performance] Introduce Fast variants for SingleRow predictors.

Although this already provides performance gains by itself for any
callers, two new functions were added to Java's SWIG interfaces to
exploit that AND the GetPrimitiveArrayCritical data fetches.

* [tests/profiling] Profile Fast predict methods

Build with -DBUILD_PROFILING_TESTS=ON and copy the default
model trained on the Higgs dataset from the benchmarks repo

 https://github.com/guolinke/boosting_tree_benchmarks.git

to LightGBM repo root and run the lightgbm_profile_* binaries.

The single instance used is the first row from that dataset.

* Update comment on CMakeLists.

* Fix doxygen-introduced issue (#threads)

* Fix conflicts due to new RowFunctionFromCSR signature in master

* Change FastConfig ncol to int32_t.

* Removed profiling folder

* fix doxygen typo include/LightGBM/c_api.h

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* fix doxygen typo include/LightGBM/c_api.h

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* fix doxygen typo include/LightGBM/c_api.h

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Doxygen: change new docstrings to double back-quote

Co-authored-by: alberto.ferreira <alberto.ferreira@feedzai.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-07-15 22:50:56 +03:00
Guolin Ke 87d46489f3
feature importance type in saved model file (#3220)
* feature importance type in saved model file

* fix nullptr

* fixed formatting

* fix python/R

* Update src/c_api.cpp

* Apply suggestions from code review

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* fix c_api test

* fix swig

* minor docs improvements and added defines for importance types

Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-07-15 22:18:53 +03:00
Germán Ramírez-Espinoza 7b8b51518c
[python][scikit-learn] Fixes a bug that prevented using multiple eval_metrics in LGBMClassifier (#3222)
* Fixes a bug that prevented using multiple eval_metrics in LGBMClassifier

* Move bug-fix test to the test_metrics unit-test

* Fix test to avoid issues with existing tests

* Fix coding-style error

Co-authored-by: German I Ramirez-Espinoza <gire@home>
2020-07-14 19:56:45 +03:00
James Lamb 61b3c30842
add rules for tests/ in CODEOWNERS (#3226) 2020-07-13 10:43:18 -05:00
Nikita Titov 4b74139ad9
[ci] bump R 4 version (#3225) 2020-07-13 17:22:16 +03:00
James Lamb 1c21d12eb3
removing custom R-to-C++ interface (#3223) 2020-07-12 21:16:30 -05:00
James Lamb 2792923d35
[R-package] Add version floor of R 3.5 (fixes #3212) (#3216) 2020-07-11 22:37:31 -05:00
James Lamb 7b935430d8
[R-package] remove unused Suggests dependencies (#3217) 2020-07-10 08:41:55 -05:00
guanqun e7a2b66f9c
typo fix (#3174) 2020-07-09 16:01:10 +08:00
Lewington-pitsos 2ee77ba07c
[docs] Improve some phrasing in the installation guide (#3214)
* Improve some phrasing

* implement requested changes
2020-07-08 21:48:47 +03:00
Hongbin Shi adda5c5330
Remove extra semicolons (#3215) 2020-07-08 16:04:22 +08:00
Guolin Ke aef50f8614
[python] fix early_stopping_round = 0 (#3211)
* Update engine.py

* Update sklearn.py
2020-07-07 19:48:08 +03:00
Belinda Trotta 1e2013a306
Fix integer overflow in auc_mu. (#3209) 2020-07-07 17:55:40 +08:00
James Lamb d8bc0fc7e5
[ci][docs][R-package] catch builds that have not updated docs (#3205)
* [ci] [R-package] catch builds that have not updated docs

* drop reliance on .Renviron

* remove docs changes

* Update .ci/test_r_package.sh

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* make all R tasks start with r-package

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-07-06 00:32:37 +03:00
Nikita Titov bf01f53a01
[ci] bump gcc version for macOS (#3208)
* update gcc version

* Update setup.sh

* fix GitHub Actions
2020-07-05 15:30:49 -05:00
Belinda Trotta 4f8c32d9a6
[R-package] Interface for interaction constraints (#3136)
* Add interaction constraints functionality.

* Minor fixes.

* Minor fixes.

* Change lambda to function.

* Fix gpu bug, remove extra blank lines.

* Fix gpu bug.

* Fix style issues.

* Try to fix segfault on MACOS.

* Fix bug.

* Fix bug.

* Fix bugs.

* Change parameter format for R.

* Fix R style issues.

* Change string formatting code.

* Change docs to say R package not supported.

* Refactor check_interaction_constraints into separate function, add validation.

* Fix error messages.

* Add tests.

* Update docs.

* Fix tests, minor refactoring.

* Fix style issues.

* Fix R style issue.

* Remove old code.

* Fix existing test and add new one.

* Fix R lint error.
2020-07-02 13:45:44 -05:00
shiyu1994 cfc5e4fe8b
store the true split gain in tree model (#3196) 2020-07-02 13:09:10 +08:00
Guolin Ke ddf8c104a4
Allow the minimal feature to 1 in column sampling (#3197)
Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
2020-07-02 00:57:33 +03:00
James Lamb 314b9d2467
[R-package] [ci] Fix MiKTeX downloads (fixes #3198) (#3199)
* [R-package] [ci] Fix MiKTeX downloads (fixes #3198)

* use v2
2020-07-01 19:28:02 +03:00
Ilya Matiach 9f367d11ad
adding sparse support to TreeSHAP in lightgbm (#3000)
* adding sparse support to TreeSHAP in lightgbm

* updating based on comments

* updated based on comments, used fromiter instead of frombuffer

* updated based on comments

* fixed limits import order

* fix sparse feature contribs to work with more than int32 max rows

* really fixed int64 max error and build warnings

* added sparse test with >int32 max rows

* fixed python side reshape check on sparse data

* updated based on latest comments

* fixed comments

* added CSC INT32_MAX validation to test, fixed comments
2020-06-28 19:19:19 +03:00
Belinda Trotta d563aff9a6
Fix bug with interaction constraints (#3189)
* Fix bug: crashes when interaction_constraints is nonempty and not all features are used.

* Fix python lint error.
2020-06-28 14:46:06 +08:00
Alex 7284946614
[python][scikit-learn] new stacking tests and make number of features a property (#3173)
* modify attribute and include stacking tests

* backwards compatibility

* check sklearn version

* move stacking import

* Number of input features (#3173)

* Number of input features (#3173)

* Number of input features (#3173)

* Number of input features (#3173)

Split number of features and stacking tests.

* Number of input features (#3173)

Modify test name.

* Number of input features (#3173)

Update stacking tests for review comments.

* Number of input features (#3173)

* Number of input features (#3173)

* Number of input features (#3173)

* Number of input features (#3173)

Modify classifier test.

* Number of input features (#3173)

* Number of input features (#3173)

Check score.
2020-06-27 21:26:13 +03:00
Nikita Titov 5d2cc516a0
[docs] document option to build a static library (#3190) 2020-06-27 16:36:55 +03:00
James Lamb 068a67d8e4
[R-package][ci] update to R 4.0.2 for Windows CI jobs (fixes #3191) (#3193)
* first attempt

* update to R 4.0.2

* no duplicate builds

* [R-package] [ci] update to R 4.0.2 for Windows CI jobs (fixes #3191)
2020-06-27 15:40:45 +03:00
Darby Payne 2e2757f183
Adding static library option (#3171) 2020-06-26 22:32:36 +03:00
James Lamb be85f56ffc
[R-package] fix R CMD check NOTE about leftover files (#3181)
* [R-package] fix R CMD check NOTE about leftover files

* update number of allowed notes
2020-06-23 09:01:02 -05:00
Belinda Trotta bca2da9728
Interaction constraints (#3126)
* Add interaction constraints functionality.

* Minor fixes.

* Minor fixes.

* Change lambda to function.

* Fix gpu bug, remove extra blank lines.

* Fix gpu bug.

* Fix style issues.

* Try to fix segfault on MACOS.

* Fix bug.

* Fix bug.

* Fix bugs.

* Change parameter format for R.

* Fix R style issues.

* Change string formatting code.

* Change docs to say R package not supported.

* Remove R functionality, moving to separate PR.

* Keep track of branch features in tree object.

* Only track branch features when feature interactions are enabled.

* Fix lint error.

* Update docs and simplify tests.
2020-06-23 16:39:48 +03:00
Nikita Titov f5e516493e
[ci][docs] added GitHub Actions badge and simplified condition in config (#3179)
* added GitHub Actions badge

* simplified condition in config
2020-06-23 01:18:32 +03:00
James Lamb 85b2843970
[R-package] [ci] cut nrounds in unit tests (#3169) 2020-06-23 00:25:10 +03:00
Nikita Titov fa2de89bb6
[docs][scikit-learn] removed duplicated docstrings (#3164)
* Revert "[ci][docs] temporarily pin Sphinx version (#3157)"

This reverts commit b3a84df5af.

* removed duplicated docstrings
2020-06-23 00:06:46 +03:00
Nikita Titov b6ec745892
[ci] update Boost version (#3175) 2020-06-22 23:37:39 +03:00
Nikita Titov 454aa336d0
[ci][docs] fix broken links (#3176)
* Update make.bat

* Update README.rst

* Update .linkcheckerrc

* Update GPU-Windows.rst

* Update GPU-Windows.rst
2020-06-22 11:36:15 -05:00
James Lamb 8696a490de
[ci] Move R Windows CI to GitHub Actions (#3168)
* [ci] Move R Windows CI to GitHub Actions

* fix OS filter

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* remove trailing semicolon

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-06-21 20:08:58 -05:00
James Lamb e83042f206
[R-package] Add support for R 4.0 (fixes #3064, fixes #3024) (#3065)
* [R-package] replaced gendef.exe with R code to create R.def (fixes #3064)

* fix broken things

* trying to add R4.0 docs

* changed make

* fixing make paths

* update notes on environment variables

* fix linting

* fixes to CI

* fixing build_cmd and other stuff

* fix bad substitution

* fix Azure Linux builds

* I am bad at bash

* simplifying

* only testing R

* getting better logs

* mingw32

* docs

* toolchain

* using msys

* fix visual studio condition

* toolchain test

* full CI

* fix if-elses

* bump allowed NOTEs

* search for Rscript

* updates to docs

* use processx

* fix mismatched arguments

* move CI to GitHub Actions

* minor changes

* fix workflow file

* fix templating

* fix Azure DevOps

* debugging windows builds

* dont shQuote file name

* all GitHub Actions jobs

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* minor cleanup

* remove objdump printing

* make file.remove() invisible

* Apply suggestions from code review

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* reduce duplicated paths in docs

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-06-14 08:56:34 +08:00