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

139 Коммитов

Автор SHA1 Сообщение Дата
James Lamb 7880b79fde
[docs] Change some 'parallel learning' references to 'distributed learning' (#4000)
* [docs] Change some 'parallel learning' references to 'distributed learning'

* found a few more

* one more reference
2021-02-19 09:47:30 -06:00
Nikita Titov b8cfaf61a7
[CUDA] added support for Clang (#3886) 2021-02-01 14:57:47 +03:00
Nikita Titov 763b5f3cdc
[CUDA][docs] explicitly require CUDA 9.0 or higher (#3885) 2021-02-01 14:09:53 +03:00
Nikita Titov 0c42cb4075
[CUDA] Support CUDA 9 and test different CUDA versions at CI (#3880)
* test different CUDA versions

* Update cuda.yml

* Update cuda.yml

* Update setup.sh

* Update setup.sh

* Update cuda.yml

* Update cuda.yml

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Update cuda.yml

* Update cuda.yml

* Update cuda.yml

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update cuda.yml

* Update cuda.yml

* Update cuda.yml

* Update CMakeLists.txt

* specify CUDA version in workflow job name
2021-01-31 17:28:14 +03:00
Nikita Titov 6bb6164e3c
Move compute and eigen libraries to external_libs folder (#3809)
* move all submodules to external_libs folder

* Update .Rbuildignore

* Update MANIFEST.in

* Update .appveyor.yml

* Update CMakeLists.txt

* Update build_r.R

* Update test.sh

* Update setup.py

* Update CMakeLists.txt

* Update test.sh

* Update setup.py

* Update conf.py

* Update MANIFEST.in

* Update LightGBM.vcxproj

* continue

* test

* test

* Update setup.py

* hotfix

* revert CI tests
2021-01-22 17:45:43 +03:00
Nikita Titov f1ec2d204f
revert forcing CMake to try compile static library for R-package (#3784) 2021-01-18 09:44:35 -06:00
James Lamb 6cb968af2e
[python-package] remove unused Eigen files, compile with EIGEN_MPL2_ONLY (fixes #3684) (#3685)
* [python-package] remove unused Eigen files (fixes #3684)

* more changes

* add EIGEN_MPL2_ONLY in VS solution file

* fix VS project

* remove EIGEN_MPL2_ONLY define in linear_tree_learner

Co-authored-by: Nikita Titov <nekit94-12@hotmail.com>
2020-12-30 02:16:34 +03:00
Nikita Titov 5a4608467d
small code and docs refactoring (#3681)
* small code and docs refactoring

* Update CMakeLists.txt

* Update .vsts-ci.yml

* Update test.sh

* continue

* continue

* revert stable sort for all-unique values
2020-12-29 01:24:38 +03:00
Belinda Trotta fcfd4132e6
Trees with linear models at leaves (#3299)
* Add Eigen library.

* Working for simple test.

* Apply changes to config params.

* Handle nan data.

* Update docs.

* Add test.

* Only load raw data if boosting=gbdt_linear

* Remove unneeded code.

* Minor updates.

* Update to work with sk-learn interface.

* Update to work with chunked datasets.

* Throw error if we try to create a Booster with an already-constructed dataset having incompatible parameters.

* Save raw data in binary dataset file.

* Update docs and fix parameter checking.

* Fix dataset loading.

* Add test for regularization.

* Fix bugs when saving and loading tree.

* Add test for load/save linear model.

* Remove unneeded code.

* Fix case where not enough leaf data for linear model.

* Simplify code.

* Speed up code.

* Speed up code.

* Simplify code.

* Speed up code.

* Fix bugs.

* Working version.

* Store feature data column-wise (not fully working yet).

* Fix bugs.

* Speed up.

* Speed up.

* Remove unneeded code.

* Small speedup.

* Speed up.

* Minor updates.

* Remove unneeded code.

* Fix bug.

* Fix bug.

* Speed up.

* Speed up.

* Simplify code.

* Remove unneeded code.

* Fix bug, add more tests.

* Fix bug and add test.

* Only store numerical features

* Fix bug and speed up using templates.

* Speed up prediction.

* Fix bug with regularisation

* Visual studio files.

* Working version

* Only check nans if necessary

* Store coeff matrix as an array.

* Align cache lines

* Align cache lines

* Preallocation coefficient calculation matrices

* Small speedups

* Small speedup

* Reverse cache alignment changes

* Change to dynamic schedule

* Update docs.

* Refactor so that linear tree learner is not a separate class.

* Add refit capability.

* Speed up

* Small speedups.

* Speed up add prediction to score.

* Fix bug

* Fix bug and speed up.

* Speed up dataload.

* Speed up dataload

* Use vectors instead of pointers

* Fix bug

* Add OMP exception handling.

* Change return type of LGBM_BoosterGetLinear to bool

* Change return type of LGBM_BoosterGetLinear back to int, only parameter type needed to change

* Remove unused internal_parent_ property of tree

* Remove unused parameter to CreateTreeLearner

* Remove reference to LinearTreeLearner

* Minor style issues

* Remove unneeded check

* Reverse temporary testing change

* Fix Visual Studio project files

* Restore LightGBM.vcxproj.filters

* Speed up

* Speed up

* Simplify code

* Update docs

* Simplify code

* Initialise storage space for max num threads

* Move Eigen to include directory and delete unused files

* Remove old files.

* Fix so it compiles with mingw

* Fix gpu tree learner

* Change AddPredictionToScore back to const

* Fix python lint error

* Fix C++ lint errors

* Change eigen to a submodule

* Update comment

* Add the eigen folder

* Try to fix build issues with eigen

* Remove eigen files

* Add eigen as submodule

* Fix include paths

* Exclude eigen files from Python linter

* Ignore eigen folders for pydocstyle

* Fix C++ linting errors

* Fix docs

* Fix docs

* Exclude eigen directories from doxygen

* Update manifest to include eigen

* Update build_r to include eigen files

* Fix compiler warnings

* Store raw feature data as float

* Use float for calculating linear coefficients

* Remove eigen directory from GLOB

* Don't compile linear model code when building R package

* Fix doxygen issue

* Fix lint issue

* Fix lint issue

* Remove uneeded code

* Restore delected lines

* Restore delected lines

* Change return type of has_raw to bool

* Update docs

* Rename some variables and functions for readability

* Make tree_learner parameter const in AddScore

* Fix style issues

* Pass vectors as const reference when setting tree properties

* Make temporary storage of serial_tree_learner mutable so we can make the object's methods const

* Remove get_raw_size, use num_numeric_features instead

* Fix typo

* Make contains_nan_ and any_nan_ properties immutable again

* Remove data_has_nan_ property of tree

* Remove temporary test code

* Make linear_tree a dataset param

* Fix lint error

* Make LinearTreeLearner a separate class

* Fix lint errors

* Fix lint error

* Add linear_tree_learner.o

* Simulate omp_get_max_threads if openmp is not available

* Update PushOneData to also store raw data.

* Cast size to int

* Fix bug in ReshapeRaw

* Speed up code with multithreading

* Use OMP_NUM_THREADS

* Speed up with multithreading

* Update to use ArrayToString

* Fix tests

* Fix test

* Fix bug introduced in merge

* Minor updates

* Update docs
2020-12-24 14:01:23 +08:00
James Lamb 1c5930bf1d
[R-package] Remove CLI-only objects (#3566)
* [R-package] Remove CLI-only objects

* more guards

* more guards

* variable not string

* simplify fix

* revert build_r.R changes

* move define of global_timer

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-11-21 18:06:01 +03:00
Nikita Titov 6c10c4ca06
move APPLE_OUTPUT_DYLIB option closer to the rest options (#3547)
* move APPLE_OUTPUT_DYLIB option closer to the rest options

* Update CMakeLists.txt
2020-11-09 19:44:39 +03:00
James Lamb 6e210c999d
[ci][R-package] Fix failures with R 3.6 and CMake (fixes #3469) (#3541)
* [R-package] Fix failures with R 3.6 and CMake

* min version
2020-11-09 15:12:49 +03:00
Nikita Titov c4427fbcc9
bump minimal CMake version (#3501) 2020-10-30 17:15:29 +03:00
TP Boudreau 3454698efe
Add option to build with integrated OpenCL (#3144)
* Add specialized OpenCL/Python package build path

* Refer to upstream OpenCL repository

* Reset build job count in setup.py

* TEMPORARY: refer to OpenCL fork to ensure Linux CI builds succeed

* Remove intermediate cmake target

* Restrict OpenCL headers to documented API version

* Use command line definition to activate integrated build

* Flag reference to unofficial repo with FIXME

* TEMPORARY: update private repo tag for dependency

* Remove integrated build for non-Win32 and related cleanup

* Remove commented code

* Rename integrated OpenCL build option and other cleanups

* Small cleanups

* Update CMakeIntegratedOpenCL.cmake

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

* Update CMakeIntegratedOpenCL.cmake

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

* Update CMakeIntegratedOpenCL.cmake

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

* Update CMakeIntegratedOpenCL.cmake

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

* Update CMakeLists.txt

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

* Update CMakeLists.txt

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

* Update CMakeLists.txt

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

* Update CMakeIntegratedOpenCL.cmake

Targeted download of Boost submodules.

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

* Update CMakeLists.txt

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

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-09-21 20:48:53 +03:00
Chip Kerchner f7ad945717
[GPU] Add support for CUDA-based GPU build (#3160)
* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* Initial CUDA work

* redirect log to python console (#3090)

* redir log to python console

* fix pylint

* Apply suggestions from code review

* Update basic.py

* Apply suggestions from code review

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

* Update c_api.h

* Apply suggestions from code review

* Apply suggestions from code review

* super-minor: better wording

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>

* re-order includes (fixes #3132) (#3133)

* Revert "re-order includes (fixes #3132) (#3133)" (#3153)

This reverts commit 656d2676c2.

* Missing change from previous rebase

* Minor cleanup and removal of development scripts.

* Only set gpu_use_dp on by default for CUDA. Other minor change.

* Fix python lint indentation problem.

* More python lint issues.

* Big lint cleanup - more to come.

* Another large lint cleanup - more to come.

* Even more lint cleanup.

* Minor cleanup so less differences in code.

* Revert is_use_subset changes

* Another rebase from master to fix recent conflicts.

* More lint.

* Simple code cleanup - add & remove blank lines, revert unneccessary format changes, remove added dead code.

* Removed parameters added for CUDA and various bug fix.

* Yet more lint and unneccessary changes.

* Revert another change.

* Removal of unneccessary code.

* temporary appveyor.yml for building and testing

* Remove return value in ReSize

* Removal of unused variables.

* Code cleanup from reviewers suggestions.

* Removal of FIXME comments and unused defines.

* More reviewers comments cleanup.

* More reviewers comments cleanup.

* More reviewers comments cleanup.

* Fix config variables.

* Attempt to fix check-docs failure

* Update Paramster.rst for num_gpu

* Removing test appveyor.yml

* Add ƒCUDA_RESOLVE_DEVICE_SYMBOLS to libraries to fix linking issue.

* Fixed handling of data elements less than 2K.

* More reviewers comments cleanup.

* Removal of TODO and fix printing of int64_t

* Add cuda change for CI testing and remove cuda from device_type in python.

* Missed one change form previous check-in

* Removal AdditionConfig and fix settings.

* Limit number of GPUs to one for now in CUDA.

* Update Parameters.rst for previous check-in

* Whitespace removal.

* Cleanup unused code.

* Changed uint/ushort/ulong to unsigned int/short/long to help Windows based CUDA compiler work.

* Lint change from previous check-in.

* Changes based on reviewers comments.

* More reviewer comment changes.

* Adding warning for is_sparse. Revert tmp_subset code. Only return FeatureGroupData if not is_multi_val_

* Fix so that CUDA code will compile even if you enable the SCORE_T_USE_DOUBLE define.

* Reviewer comment cleanup.

* Replace warning with Log message. Removal of some of the USE_CUDA. Fix typo and removal of pragma once.

* Remove PRINT debug for CUDA code.

* Allow to use of multiple GPUs for CUDA.

* More multi-GPUs enablement for CUDA.

* More code cleanup based on reviews comments.

* Update docs with latest config changes.

Co-authored-by: Gordon Fossum <fossum@us.ibm.com>
Co-authored-by: ChipKerchner <ckerchne@linux.vnet.ibm.com>
Co-authored-by: Guolin Ke <guolin.ke@outlook.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: StrikerRUS <nekit94-12@hotmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2020-09-20 13:35:01 +08:00
Nikita Titov 571cad7e55
[R-package] mark CMake option for building R package as private (#3397)
* Update install.libs.R

* Update CMakeLists.txt
2020-09-14 21:52:35 +03:00
James Lamb 2792923d35
[R-package] Add version floor of R 3.5 (fixes #3212) (#3216) 2020-07-11 22:37:31 -05:00
Nikita Titov 5d2cc516a0
[docs] document option to build a static library (#3190) 2020-06-27 16:36:55 +03:00
Darby Payne 2e2757f183
Adding static library option (#3171) 2020-06-26 22:32:36 +03:00
James Lamb f77abac195
[R-package] CMake fixes to support MSVC (#2963)
* [R-package] CMake fixes to support MSVC

* simplifications

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* removed MSVC_RUNTIME_LIBRARY property

* fixed FindLibR search for LIBR_CORE_LIBRARY

* Update CMakeLists.txt

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* made R.lib linking more explicit

* add R_DOT_LIB_FILE to cache

* changed R.lib CMake name

* fix placementt tof R_MSVC_CORE_LIBRARY

* empty commit

* change MSVC library name

* one more name change

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-05-03 02:08:18 +03:00
James Lamb 84bdf25798
[R-package] adding routine registration in R package (fixes #1910) (#2911) 2020-04-01 11:18:52 -05:00
James Lamb 0341906c45
[R-package] Use Rprintf for logging in the R package (fixes #1440, fixes #1909) (#2901)
* [R-package] started cutting over from custom R-to-C interface to R.h

* replaced LGBM_SE with SEXP

* fixed error about ocnflicting definitions of length

* got linking working

* more stuff

* eliminated R CMD CHECK note about printing

* switched from hard-coded include dir to the one from FindLibR.cmake

* cleaned up formatting in FindLibR.cmake

* commented-out everything in CI that does not touch R

* more changes

* trying to get better logs

* tried ignoring

* added error message to confirm a suspicion

* still trying to find R during R CMD CHECK

* restore full CI

* fixed comment

* Update R-package/src/cmake/modules/FindLibR.cmake

* changed strategy for finding LIBR_HOME on Windows

* Removed 32-bit Windows stuff in FindLibR.cmake

* Update R-package/src/cmake/modules/FindLibR.cmake

* Update CMakeLists.txt

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update CMakeLists.txt

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* removed some duplication in cmake scripts

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* added LIBR_CORE_LIBRARY back

* small fixes to CMakeLists

* simplified FindLibR.cmake

* some fixes for windows

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* allowed for directly passing LIBR_EXECUTABLE to FindLibR.cmake

* reorganized FindLibR.cmake to catch more cases

* clean up inconsistencies  in R calls in FindLibR.cmake

* Update R-package/src/cmake/modules/FindLibR.cmake

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* removed unnecessary log messages

* removed unnecessary unset() call

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-03-24 03:11:30 +03:00
James Lamb 17b8ce16cf
[R-package] Introduce R-specific control of lib_lightgbm (#2837)
* [R-package] Introduced define LGB_BUILD_R to control compilation of lib_lightgbm for the R package

* fixed comment

* switched to cmake options

* fixed typo
2020-03-09 22:56:39 -05:00
Guolin Ke 8d90bbe314
Debug flags (#2825)
* add debug mode in camke

* add debug dll

* Apply suggestions from code review

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>

* fix naming

* Apply suggestions from code review

* Apply suggestions from code review

* Update LightGBM.sln

* refine

* run MPI job in debug mode

* document USE_DEBUG and USE_TIMETAG

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-03-01 08:15:25 +08:00
Guolin Ke 84fb5e518a
No LinkTimeCodeGeneration in VS (#2812)
* add Link Time Code Generation

* remove ltcg

* Apply suggestions from code review
2020-02-26 11:54:40 +08:00
Nikita Titov 1c1a276519 various minor style, docs and cpplint improvements (#2747)
* various minor style, docs and cpplint improvements

* fixed typo in warning

* fix recently added cpplint errors

* move note for params upper in description for consistency
2020-02-09 02:15:24 +03:00
Guolin Ke 509c2e50c2
Support both row-wise and col-wise multi-threading (#2699)
* commit

* fix a bug

* fix bug

* reset to track changes

* refine the auto choose logic

* sort the time stats output

* fix include

* change  multi_val_bin_sparse_threshold

* add cmake

* add _mm_malloc and _mm_free for cross platform

* fix cmake bug

* timer for split

* try to fix cmake

* fix tests

* refactor DataPartition::Split

* fix test

* typo

* formating

* Revert "formating"

This reverts commit 5b8de4f7fb.

* add document

* [R-package] Added tests on use of force_col_wise and force_row_wise in training (#2719)

* naming

* fix gpu code

* Update include/LightGBM/bin.h

Co-Authored-By: James Lamb <jaylamb20@gmail.com>

* Update src/treelearner/ocl/histogram16.cl

* test: swap compilers for CI

* fix omp

* not avx2

* no aligned for feature histogram

* Revert "refactor DataPartition::Split"

This reverts commit 256e6d9641.

* slightly refactor data partition

* reduce the memory cost

Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-02-02 12:42:17 +08:00
Guolin Ke d6c41fa1b2
check _mm_prefetch in cmake (#2694)
* try to use _mm_prefetch anywhere

* refine

* fix bug

* remove the unneeded prefetch
2020-01-15 22:08:11 +08:00
Nikita Titov 8944b5e6b9
removed OpenMP ugly fix for Mojave (#2674)
* removed OpenMP ugly fix for Mojave as it's fixed in latest CMake

* test: switch compilers

* switch compilers back
2020-01-12 16:51:27 +03:00
James Lamb e09e4caa4d fixed minor issues with R package (#2167) 2019-05-12 10:36:27 +02:00
Nikita Titov b40d0dc3d6
[ci][SWIG] fixed SWIG -Wstrict-aliasing warnings (#2139) 2019-05-04 23:42:18 +03:00
Nikita Titov 5ece53b5e0 [docs] updated the part about Boost in installation guide (#2082)
* updated installation guide

* updated Python installation guide

* added note about opencl path to Windows section

* added space before path in message

* minor correction for option description in Python installation guide
2019-04-30 10:53:49 -07:00
Nikita Titov 2961759337
minor fixes in CMakeLists (#2099)
* minor fixed in CMakeLists

* state what message is about
2019-04-17 15:03:32 +03:00
Ilya Matiach 414bb609c0 added LightGBM SWIG wrappers for macOS and updated docs (#2002)
* added LightGBM SWIG wrappers for macOS and updated docs

* updated installation instructions based on comments

* updated based on comments
2019-02-20 14:21:02 +08:00
Tsukasa OMOTO b96849918d
Fix build on macOS Mojave (#1923)
* Fix build on macOS Mojave

Fixed #1898

- https://iscinumpy.gitlab.io/post/omp-on-high-sierra/
- https://cliutils.gitlab.io/modern-cmake/chapters/packages/OpenMP.html
- https://github.com/Homebrew/homebrew-core/pull/20589

* update setup.py

* update docs

* fix setup.py

* update docs

* update docs

* update setup.py

* update docs
2019-01-26 13:40:59 +09:00
Nikita Titov 2aaf9b7516 [docs] Unified references and fixed typo (#1695)
* unified references

* fixed typo

* GPU version is quite stable now

* updated reference for GPU version
2018-09-24 11:47:55 -07:00
Ilya Matiach aac8e8f77a Added LightGBM JAVA SWIG wrapper support for windows (#1599) 2018-08-28 09:56:31 +08:00
Nikita Titov ad7738ac51
[ci] added tests with Clang/AppleClang compilation at Travis (#1522)
* added clang test

* hotfix

* downgrade required AppleCLang version

* fixed CMakeLists

* prevent case when CMake is downgraded by libomp

* fixed Clang test

* moved MSVC version check to the better place

* compile with Clang at Travis on Linux

* clear .travis.yml

* fixed indents

* added support of MPI test at Travis with macOS

* added FAQ entry about OpenMP library error

* updated installation guide

* moved APPLE_OUTPUT_DYLIB to other options

* fix check-docs test: ignore old url from error message

* added example of symlink command in FAQ

* fixed markdown

* capitalized heading

* updated Python installation guide

* changed mode in message command

* added notes about MinGW efficiency problems

* updated R-package installation guide

* use quotes for gcc version

* removed excess 'Note' phrase
2018-08-13 12:03:49 +03:00
Liwen Fan f5afaba162
Merge branch 'master' into 1492 2018-07-13 01:10:01 +08:00
Guolin Ke 1437ce8b8f
add vsts ci (#1497)
* fix bugs

* many fixes

* remove duplicate lines

* test for mingw

* Not nuget in appveyor

* remove mingw build

* Update test.sh

* Update test.sh

* Update test.sh

* fixed macOS wheel name

* don't run docs test at VSTS

* made nuget creating script directory independent
2018-07-12 23:43:59 +08:00
fanliwen 232112c878 move cmake_minimum_required to the top of the file where others are listed 2018-07-12 11:43:28 +08:00
fanliwen d6bd3c217d support AppleClang with openmp
https://github.com/Microsoft/LightGBM/issues/1492
2018-07-10 16:42:30 +08:00
Nikita Titov a39c848e64
[docs][python] made OS detection more reliable and little docs improvements (#1414)
* added missed description of plot_example in python_guide folder and fixed consistency for packages naming

* more reliable OS detection

* fixed grammar

* made pylint happy
2018-06-03 12:46:59 +03:00
Guolin Ke 49677098fe
fix R build for version 3.5 and above (#1346) 2018-04-28 08:22:29 +08:00
Jerry Liu 84fef71528 add force_split functionality (#1310) 2018-04-24 16:19:54 +08:00
Guolin Ke e005cdb049
Monotone Constraint (#1314) 2018-04-18 11:12:36 +08:00
ebernhardson 7e186a5783 Experimental support for HDFS (#1243)
* Read and write datsets from hdfs.
* Only enabled when cmake is run with -DUSE_HDFS:BOOL=TRUE
* Introduces VirtualFile(Reader|Writer) to asbtract VFS differences
2018-02-27 12:53:21 +08:00
Ilya Matiach 6d58decf51 Adding SWIG Java wrappers to LightGBM (#1223)
* 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
2018-01-31 14:20:41 +08:00
Nikita Titov d51f2b4fb7 [ci] [docs] compilation on macOS (#1088)
* updated travis

* renamed OSX->macOS; updated gcc installation on macOS

* updated travis macos installation

 Please enter the commit message for your changes. Lines starting

* updated installation guide for macos

* fixed spelling

* renamed appveyor file

* updated Travis
2017-11-29 18:28:14 +08:00
Guolin Ke 8a5ec366aa
Speed up saving and loading model (#1083)
* remove protobuf

* add version number

* remove pmml script

* use float for split gain

* fix warnings

* refine the read model logic of gbdt

* fix compile error

* improve decode speed

* fix some bugs

* fix double accuracy problem

* fix bug

* multi-thread save model

* speed up save model to string

* parallel save/load model

* fix some warnings.

* fix warnings.

* fix a bug

* remove debug output

* fix doc

* fix max_bin warning in tests.

* fix max_bin warning

* fix pylint

* clean code for stringToArray

* clean code for TToString

* remove max_bin

* replace "class" with typename
2017-11-26 16:07:06 +08:00
Nikita Titov b3c20f7aba changed minimum version of VS to 2015 (#1027) 2017-11-01 13:55:58 +08:00
wxchan 2b20569e30 fix protobuf on vs build (#1004)
* [optional] support protobuf

* fix windows/LightGBM.vcxproj

* add doc

* fix doc

* fix vs support (#2)

* fix vs support

* fix cmake
2017-10-26 09:16:07 +08:00
Guolin Ke 1ef3d43ecd Revert "[optional] support protobuf (#908)" (#1002)
This reverts commit 53b99854aa.
2017-10-20 21:12:09 +08:00
wxchan 53b99854aa [optional] support protobuf (#908) 2017-10-19 14:49:54 +08:00
Nikita Titov 6d34fb8635 [docs] move wiki to Read the Docs (#945)
* fixed Python-API references

* moved Features section to ReadTheDocs

* fixed index of ReadTheDocs

* moved Experiments section to ReadTheDocs

* fixed capital letter

* fixed citing

* moved Parallel Learning section to ReadTheDocs

* fixed markdown

* fixed Python-API

* fixed link to Quick-Start

* fixed gpu docker README

* moved Installation Guide from wiki to ReadTheDocs

* removed references to wiki

* fixed capital letters in headings

* hotfixes

* fixed non-Unicode symbols and reference to Python API

* fixed citing references

* fixed links in .md files

* fixed links in .rst files

* store images locally in the repo

* fixed missed word

* fixed indent in Experiments.rst

* fixed 'Duplicate implicit target name' message which is successfully
resolved by adding anchors

* less verbose

* prevented maito: ref creation

* fixed indents

* fixed 404

* fixed 403

* fixed 301

* fixed fake anchors

* fixed file extentions

* fixed Sphinx warnings

* added StrikerRUS profile link to FAQ

* added henry0312 profile link to FAQ
2017-10-07 23:43:58 +08:00
Nikita Titov 3cce5ee1fb fixed build with MinGW (#899) 2017-09-10 09:33:46 +08:00
Guolin Ke 959fb8fbe5 Update CMakeLists.txt 2017-07-24 12:21:50 +08:00
Guolin Ke 336288a376 Try to relax the cmake version (#723) 2017-07-24 10:44:08 +08:00
Qiwei Ye 1c21b1d810 Update CMakeLists.txt 2017-07-22 17:47:13 +08:00
Qiwei Ye 03705c3b8d Update CMakeLists.txt 2017-07-22 17:47:01 +08:00
Tsukasa OMOTO 6828461d03 Remove CMAKE_CXX_COMPILER and CMAKE_C_COMPILER for OSX (#719)
* Remove CMAKE_CXX_COMPILER and CMAKE_C_COMPILER for OSX

* update .travis/test.sh

* update again
2017-07-22 17:25:04 +08:00
Guolin Ke 2e0a8077c5 rollback cmakelists 2017-06-20 14:18:37 +08:00
Guolin Ke 80c641cd17 [python] Submit to PyPI (#635)
* add make command to the python package.

* Update README.rst

* Update README.rst

* Update README.rst

* fix tests.

* fix unix build

* update readme

* fix setup.py

* update travis

* Update .travis.yml

* Update test.py

* some fixes.

* check the 64-bit python

* fix build.

* refine MANIFEST.in

* update Manifest.in

* add more build options.

* Add fatal in cmake

* fix a endif.

* fix bugs.

* fix pep8

* add test for the pip package build

* add test pip install in travis.

* fix version with pre-compile dll

* fix readme.rst

* update readme
2017-06-20 13:17:02 +08:00
Guolin Ke f98d75fc7e Compile R package by custom tool chain. (#584)
* add R's library file to vs project and cmake.

* support using dll built by vs.

* better search for the library file.

* remove mingw related doc .

* update document.

* Let R handle the library compile.

* try fix build from github.

* Update README.md

* cleaner build.

* fix the install problem in linux.

* Update README.md
2017-06-05 20:09:42 +08:00
Guolin Ke 6d4c7b03b7 Support early stopping of prediction in CLI (#565)
* fix multi-threading.

* fix name style.

* support in CLI version.

* remove warnings.

* Not default parameters.

* fix if...else... .

* fix bug.

* fix warning.

* refine c_api.

* fix R-package.

* fix R's warning.

* fix tests.

* fix pep8 .
2017-05-30 18:28:17 +08:00
Tsukasa OMOTO 2bdc9859f8 Add -Wextra to compile options (#530) 2017-05-19 15:20:40 +08:00
Guolin Ke f1b08ac82d fix #499 2017-05-07 15:31:37 +08:00
Tsukasa OMOTO 5bc6596eae Use gcc-7 on OSX (#497)
Homebrew updated gcc to 7.1.
0387fe46e9
0ab90d39e3
2017-05-07 11:26:16 +08:00
Guolin Ke 9e2ad71a79 only use static link for Boost in Windows. 2017-04-26 11:54:19 +08:00
Guolin Ke fb96b717a8 Link Boost by static library. 2017-04-25 12:17:26 +08:00
Huan Zhang 8487d0a224 Fix compilation problems with MSVC (#443)
* Fix warnings when compiled with -pedantic

* add -DBOOST_ALL_NO_LIB for windows build

* fix some more MSVC warnings

* Break OpenCL string literal to smaller pieces to avoid error C2026 of MSVC

The string was longer than the limit of 16380 single-byte characters.

This affects Visual Studio 2005 - 2015. Untested on VS 2017.
2017-04-23 19:28:52 +08:00
Laurae 8bf1297a7f Removing architecture optimizations (#440) 2017-04-22 08:35:58 +08:00
Guolin Ke 66b7f03238 reduce branching in histogram sum-up. 2017-04-17 10:35:38 +08:00
Guolin Ke 062bfa7964 Revert "[WIP]faster histogram sum up" (#422)
* Revert "python-package: support valid_names in scikit-learn API (#420)"

This reverts commit de39dbcf3d.

* Revert "faster histogram sum up (#418)"

This reverts commit 98c7c2a35a.
2017-04-17 10:16:23 +08:00
Guolin Ke 98c7c2a35a faster histogram sum up (#418)
* some refactor.

* two stage sum up to reduce sum up error.

* add more two-stage sumup.

* some refactor.

* add alignment.

* change name to aligned_allocator.

* remove some useless sumup.

* fix a warning.

* add -march=native .

* remove the padding of gradients.

* no alignment.

* fix test.

* change KNumSumupGroup to 32768.

* change gcc flags.
2017-04-16 09:10:35 +08:00
Huan Zhang 6be087487f Move Boost.Compute include path to the beginning of compiler search paths (#411)
* fix the size of vector cnt_per_class

* put Boost.Compute includes at the beginning

We want to put the submodule Boost.Compute at the beginning of compiler search
paths, because the submodule usually contains upstream bug fixes that have not
been included in the stable Boost releases installed on the host OS.
2017-04-13 10:38:55 +08:00
Huan Zhang 0bb4a825af Initial GPU acceleration support for LightGBM (#368)
* add dummy gpu solver code

* initial GPU code

* fix crash bug

* first working version

* use asynchronous copy

* use a better kernel for root

* parallel read histogram

* sparse features now works, but no acceleration, compute on CPU

* compute sparse feature on CPU simultaneously

* fix big bug; add gpu selection; add kernel selection

* better debugging

* clean up

* add feature scatter

* Add sparse_threshold control

* fix a bug in feature scatter

* clean up debug

* temporarily add OpenCL kernels for k=64,256

* fix up CMakeList and definition USE_GPU

* add OpenCL kernels as string literals

* Add boost.compute as a submodule

* add boost dependency into CMakeList

* fix opencl pragma

* use pinned memory for histogram

* use pinned buffer for gradients and hessians

* better debugging message

* add double precision support on GPU

* fix boost version in CMakeList

* Add a README

* reconstruct GPU initialization code for ResetTrainingData

* move data to GPU in parallel

* fix a bug during feature copy

* update gpu kernels

* update gpu code

* initial port to LightGBM v2

* speedup GPU data loading process

* Add 4-bit bin support to GPU

* re-add sparse_threshold parameter

* remove kMaxNumWorkgroups and allows an unlimited number of features

* add feature mask support for skipping unused features

* enable kernel cache

* use GPU kernels withoug feature masks when all features are used

* REAdme.

* REAdme.

* update README

* fix typos (#349)

* change compile to gcc on Apple as default

* clean vscode related file

* refine api of constructing from sampling data.

* fix bug in the last commit.

* more efficient algorithm to sample k from n.

* fix bug in filter bin

* change to boost from average output.

* fix tests.

* only stop training when all classes are finshed in multi-class.

* limit the max tree output. change hessian in multi-class objective.

* robust tree model loading.

* fix test.

* convert the probabilities to raw score in boost_from_average of classification.

* fix the average label for binary classification.

* Add boost_from_average to docs (#354)

* don't use "ConvertToRawScore" for self-defined objective function.

* boost_from_average seems doesn't work well in binary classification. remove it.

* For a better jump link (#355)

* Update Python-API.md

* for a better jump in page

A space is needed between `#` and the headers content according to Github's markdown format [guideline](https://guides.github.com/features/mastering-markdown/)

After adding the spaces, we can jump to the exact position in page by click the link.

* fixed something mentioned by @wxchan

* Update Python-API.md

* add FitByExistingTree.

* adapt GPU tree learner for FitByExistingTree

* avoid NaN output.

* update boost.compute

* fix typos (#361)

* fix broken links (#359)

* update README

* disable GPU acceleration by default

* fix image url

* cleanup debug macro

* remove old README

* do not save sparse_threshold_ in FeatureGroup

* add details for new GPU settings

* ignore submodule when doing pep8 check

* allocate workspace for at least one thread during builing Feature4

* move sparse_threshold to class Dataset

* remove duplicated code in GPUTreeLearner::Split

* Remove duplicated code in FindBestThresholds and BeforeFindBestSplit

* do not rebuild ordered gradients and hessians for sparse features

* support feature groups in GPUTreeLearner

* Initial parallel learners with GPU support

* add option device, cleanup code

* clean up FindBestThresholds; add some omp parallel

* constant hessian optimization for GPU

* Fix GPUTreeLearner crash when there is zero feature

* use np.testing.assert_almost_equal() to compare lists of floats in tests

* travis for GPU
2017-04-09 21:53:14 +08:00
Qiwei Ye eade219e39 merge conflict 2017-03-18 13:31:57 +08:00
Qiwei Ye f23e608348 change compile to gcc on Apple as default 2017-03-18 12:55:02 +08:00
Carlos Becker 9595b8c11a Fixed library install dir on Windows 2017-01-24 09:58:08 +01:00
cbecker 300cee50b0 Make openmp optional, allow for dylib mac library output (#204)
* Added possibility to compile without openmp (useful for clang on Mac)

* Added CMake option to create dylib on MacOS
2017-01-12 22:46:09 +08:00
Guolin Ke b51c7be43e refine Dataset class (#113)
Provide a high level Dataset class for easy use.
2016-12-08 21:36:11 +08:00
Guolin Ke 6a792d16b4 fix library name in cmake with VS 2016-12-07 12:25:42 +08:00
Guolin Ke f1ccc4a38d change openmp to REQUIRED 2016-12-07 11:55:35 +08:00
Guolin Ke 637dc0a274 fix mingw and cygwin in cmake 2016-12-07 11:45:55 +08:00
Guolin Ke 70c31c075d simplify cmake 2016-12-07 11:31:31 +08:00
Guolin Ke 55cd60968d update cmake to build library 2016-11-08 21:24:05 +08:00
Guolin Ke f20a2c4de2 Change bulid target name to lower case. 2016-10-08 16:13:56 +08:00
Guolin Ke 1c774687cf first commit 2016-08-05 14:06:01 +08:00