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

59 Коммитов

Автор SHA1 Сообщение Дата
James Lamb ebac9e8e27
[ci] upgrade linters to latest version (#6472) 2024-06-02 22:33:53 -05:00
James Lamb 6330d6269c
[ci] enable ruff-format on some files, add pre-commit config (#6308) 2024-02-14 22:17:35 -06:00
James Lamb cc733f8595
[ci] ensure shell script exit codes are in range 0-255 (#6305) 2024-02-09 22:42:00 -06:00
Thomas J. Fan e4658e1aa8
[docs] Add scikit-learn for intersphinx (fixes #5954) (#5956) 2023-07-03 21:55:25 -05:00
James Lamb 02d212b4c0
[ci] [python-package] enforce flake8 checks (fixes #5566) (#5659) 2023-01-12 15:59:52 -06:00
James Lamb feb4cf4f47
[docs] set language = 'en' in Sphinx config (#5322) 2022-06-22 11:54:09 -05:00
Nikita Titov caa087bcc5
[docs] improve docs for sklearn wrapper (fixes #4479) (#5026)
* improve docs for sklearn wrapper

* empty commit

* install add scikit-learn to conda environment for building docs
2022-02-22 21:49:39 -06:00
James Lamb 2f27d4b226
[ci][docs] use miniforge for readthedocs builds (fixes #4954) (#4957)
* [ci] [docs] use mamba for readthedocs builds (fixes #4954)

* update docs

* simplify build script and add docs flag to gitignore

* exit with non-0 if build fails

* update CI job

* add doxygen

* remove outdated requirement_base.txt reference

* use conda create instead of conda env create

* fix conda create flags

* add nodefaults to env.yml

* Update docs/README.rst

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

* try to fix check-docs CI job

* additional changes

* switch from mamba to miniforge

* simplify docker command and fix issues in local build script

* Apply suggestions from code review

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

* update docs and conda

* Apply suggestions from code review

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

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2022-02-19 06:29:56 +03:00
Nikita Titov 2f5d898520
[docs][python] simplify mocking in docs (#4830) 2021-11-28 16:50:56 +03:00
James Lamb 5fa887bb79
[R-package] [docs] add intro vignette (#3946) (#4775)
* [R-package] [docs] add intro vignette (#3946)

* add 10 test vignettes

* Revert "add 10 test vignettes"

This reverts commit 40fb2e2f19.

* Apply suggestions from code review

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

Co-authored-by: Michael Mayer <mayermichael79@gmail.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-11-17 22:15:32 -06:00
James Lamb 99f0f3ecf1
[ci] only use conda-forge when installing R packages in docs builds (#4767) 2021-11-05 16:56:33 +03:00
Nikita Titov da98f24711
[docs ][python] add `datatable` to the mocked modules during docs building process and sort them alphabetically (#4750) 2021-10-31 20:28:44 -05:00
Nikita Titov d88b44566e
[docs] fix C API docs rendering (#4688)
* fix C API docs rendering

* place comments before members they describe
2021-10-22 02:21:05 +03:00
James Lamb 67f2cb3162
[python] add type hints in docs/conf.py (#4526)
* [python] add type hints in docs/conf.py

* more specific hint for sphinx app

* Apply suggestions from code review

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

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-08-18 20:31:59 -05:00
James Lamb 3c781ba08c
[docs] [R-package] use CRAN-style builds when building pkgdown site (#4513)
* [docs] [R-package] use CRAN-style builds when building pkgdown site

* install with --with-keep.source

* empty commit

* set new_proccess = FALSE to get a better traceback

* copy pkgdown config
2021-08-14 15:39:12 +03:00
Nikita Titov 2370961ae0
[docs][ci] bump versions of R-package dependencies at RTD (#4488)
* remove R docs

* bump deps
2021-07-26 19:41:33 +03:00
Nikita Titov 96583ab589
[python] migrate to pathlib in setup.py and use `absolute()` on paths first (#4444)
* use absolute() on paths first

* migrate to pathlib in setup.py
2021-07-10 16:18:50 +03:00
Nikita Titov 02ca158fe0
[python] migrate to pathlib in conf.py (#4427) 2021-07-03 00:24:00 +03:00
NovusEdge b2d73deea6
[python] added f-strings to docs/conf.py (#4147)
* Added f-strings to docs/conf.py

* fixed some linting errors

* fixed indent on 210:25

* YAF

* yet another try at fixing the linting

* Try: 1

* Try 2

* Update docs/conf.py

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

* Update docs/conf.py

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

* Update docs/conf.py

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

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2021-04-05 13:57:00 -05:00
Zhuyi Xue 7816ab5b5f
[ci][python] apply isort to docs/conf.py (#3958) (#3959) 2021-02-15 00:03:23 +03:00
James Lamb ea8e47ea24
[dask] Add type hints in Dask package (#3866)
* add type hints in dask module

* starting on asserts

* remove unused code

* add hints for dtypes

* replace accidentally-removed docstrings

* revert unrelated change

* Update python-package/lightgbm/dask.py

* empty commit

* fix hints on group

* capitalize array

* hide hints in signatures

* empty commit

* sphinx version

* Apply suggestions from code review

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

* fix hint for MatrixLike

* Update python-package/lightgbm/dask.py

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

* Apply suggestions from code review

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

* update docstring

* empty commit

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-01-29 11:59:21 -06:00
Nikita Titov 36322ceeae
[dask][docs] initial setup for Dask docs (#3822)
* initial Dask docs

* fix MRO

* address review comments
2021-01-24 20:58:52 -06: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 a18286e5fd
[docs] remove unused argument in docs config (#3801) 2021-01-21 04:33:39 +03:00
Nikita Titov c2dd54f13a
[ci][docs] replace file extensions in docs during Sphinx build (#3738)
* replace file extensions in docs during Sphinx build

* Update .travis.yml

* Update .travis.yml

* Update conf.py

* fix lint

* fix lint
2021-01-07 23:34:51 +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 336bd6bf18
[docs] fix R documentation builds (fixes #3655) (#3656)
* [docs] fix R documentation builds (fixes #3655)

* use RTD config
2020-12-18 13:37:58 -06:00
Nikita Titov 5771a9744d
[docs] fix RTD builds (#3644) 2020-12-11 21:50:55 +03:00
Nikita Titov 44a6fb7ffa
[python] Drop Python 2 support (#3581)
* Update setup.py

* Update .appveyor.yml

* Update .travis.yml

* Update .vsts-ci.yml

* Update __init__.py

* Update test.sh

* Update test_windows.ps1

* Update advanced_example.py

* Update requirements_base.txt

* Update conf.py

* Update conf.py

* Update test_engine.py

* Update utils.py

* Update dockerfile-r

* Update README.md

* Update dockerfile.gpu

* Update test_consistency.py

* Update basic.py

* Update compat.py

* Update engine.py

* Update sklearn.py

* Update sklearn.py

* Update callback.py

* Update setup.py

* Update __init__.py

* Update plotting.py

* Update sklearn.py

* Update engine.py

* Update compat.py

* Update callback.py

* Update basic.py

* Update compat.py

* Update basic.py

* Update basic.py

* Update compat.py

* Update compat.py

* Update plotting.py

* Update engine.py

* Update basic.py

* Update sklearn.py

* Update compat.py

* Update engine.py

* Update engine.py

* Update callback.py

* Update basic.py

* Update basic.py

* Update basic.py

* Update basic.py

* Update basic.py

* Update sklearn.py

* Update sklearn.py

* Update plotting.py

* Update sklearn.py

* Update compat.py

* Update compat.py

* Update engine.py

* Update plotting.py

* Update sklearn.py

* Update basic.py

* Update basic.py

* Update basic.py

* Update basic.py

* Update compat.py

* Update compat.py

* Update compat.py

* Update engine.py

* Update basic.py

* Update compat.py

* Update basic.py

* Update basic.py

* Update basic.py

* Update compat.py

* Update compat.py

* Update basic.py

* Update basic.py

* Update .vsts-ci.yml

* Update .vsts-ci.yml

* Update conf.py

* Revert "Update dockerfile-r"

This reverts commit 4ff6ffc7e3.
2020-12-09 13:32:00 +03:00
James Lamb cf69591b68
[R-package] [docs] fix broken plots in pkgdown site (fixes #3276) (#3508)
* [R-package] [docs] fix broken plots in pkgdown site (fixes #3276)

* upgrade CMake
2020-11-01 21:45:59 +03:00
Nikita Titov 672d0e52a1
[doc] added logo to docs (#3327) 2020-08-23 17:03:57 +08:00
James Lamb c454d5f8cc
[R-package] move all examples to dontrun() to fix R CMD CHECK notes (#3270)
* Move all examples to dontrun

* update docs

* fix nested dontrun

* remove :: in examples

* run_dontrun in pkgdown

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-08-05 20:53:11 -05:00
James Lamb bf99a07221
[R-package] [docs] replace build_r_site.R with pkgdown::build_site() (#3098)
* [R-package] [docs] replace build_r_site.R with pkgdown::build_site()

* fix paths

* fix continuation

* new_process arg
2020-05-17 12:55:09 -05:00
James Lamb 9085f4e23a
[R-package] [docs] remove devtools dependency for docs builds (fixes #3036) (#3072)
* [R-package] [docs] remove devtools dependency for docs builds

* linting

* updating docs conda env

* empty roxygenize()

* env for R libraries

* get logs

* remove comment

* added pkgdown URLs

* more paths

* fix incorrect YAML keys

* update DESCRIPTION URL link

* more URL changes

* revert DESCRIPTION changes

* remove ca-certificates

* empty commit

* Update docs/conf.py

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

* empty commit

* remove outdated line in build_r.R

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-05-14 21:14:34 +03:00
Nikita Titov 30607d80fb
be compatible with Sphinx 3 (#3013) 2020-04-22 13:47:52 -05:00
James Lamb 9478e52f9f
[R-package] fix R examples and lgb.plot.interpretation() (#3002)
* [R-package] fix R examples and lgb.plot.interpretation

* remove space in gitignore

* try data.table from conda-forge

* update FAQ

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2020-04-21 13:47:23 -05:00
Nikita Titov bc7bc4a158
[docs] fix RTD builds due to conda's problems (#2725)
* fix RTD builds

* more pins

* hotfix

* removed unnecessary pinning
2020-01-31 18:49:18 -06:00
Nikita Titov 41c366ee6b [R-package] [ci] pin roxygen2 version for RTD (#2568) 2019-11-14 22:17:28 -08:00
James Lamb 42204c43da
[R-package] factored dependency 'magrittr' out of R package (#2334) 2019-09-28 23:05:12 -05:00
Nikita Titov faba6cafb7
[docs][R] added R-package docs generation routines (#2176)
* added R-package docs generation routines

* change theme to be more consistent with sphinx_rtd_theme on main site in terms of color scheme

* placed man folder with old Rd files back

* specify full path to conda and make script more readable by one line - one pkg

* removed commented lines from build_r_site script

* made one line - one argument in build_reference() call

* pin R package versions

* fixed conflict
2019-09-01 19:47:04 +03:00
Nikita Titov f68e1b50fb
[docs] limit number of files to scan for autosummary generation and reorganize conf.py (#2297)
* limit number of files to scan for autosummary generation

* reorganize conf.py
2019-08-02 14:51:07 +03:00
Alexander L. Hayes 207bb3ef32 [docs] 🎨 Sphinx Autosummary for generating Python-API documentation (#2286)
* 🎨 `sphinx.ext.autosummary` for generating Python-API summaries

Add `docs/.gitignore` to not track autosummary stubs
Add `sphinx.ext.autosummary` in `docs/conf.py`
  Add 'members' and 'inherited-members' as default parameters
  Add 'autosummary = True' for setting output with `:toctree:`
Add `.. autosummary::` tags to replace `.. autoclass::`

Previously the `Python-API.rst` dumped all of the Python API onto
a single page.

This replaces the Python-API documentation with an index listing
all modules, and paginates all functions and classes onto
separate pages.

* ✏️ Corrections following feedback

Drop `docs/.gitignore` to use the general `.gitignore`
Add `show-inheritance` to `autodoc_default_flags` in `docs/conf.py`
Fix `both` to `class` in `autoclass_content` in `docs/conf.py`

* ✏️ Replacing deprecated Sphinx parameter

Fix deprecated `autodoc_default_flags` to `autodoc_default_options`

* ✏️ Adding `autodoc_default_flags` in to support early Sphinx versions

Add `autodoc_default_flags` with parameters from
  `autodoc_default_options`
2019-07-27 14:59:51 +03:00
Nikita Titov 5dc1507e1c
[docs] updated js file attaching mechanism (#2287) 2019-07-27 14:34:21 +03:00
Nikita Titov cfcc020e58
[ci][docs] generate docs for C API (#2059)
* use file to install deps for docs

* added C_API docs

* use breathe without exhale

* added missed params descriptions and make Doxygen fail for warnings

* escape char hotfix

* ignore unknown directive for rstcheck

* better handle env variable

* hotfix for 'Unknown directive type' error with C_API=NO

* Update .gitignore

* fixed pylint

* use already defined constants in conf.py

* do not suppress Doxygen's output

* addressed review comments

* removed unneeded import
2019-05-05 14:54:37 +03:00
James Lamb 572ae40038 [docs] Small aesthetic improvements to RTD docs (#2060)
* Small aesthetic improvements to RTD docs

* fixed markdown table in Development-Guide

* removed unnecessary blank line in conf.py
2019-03-26 22:55:17 +03:00
Nikita Titov ccf2570ca3 [docs][ci][python] added docstring style test and fixed errors in existing docstrings (#1759)
* added docstring style test and fixed errors in existing docstrings

* hotfix

* hotfix

* fix grammar

* hotfix
2018-10-16 14:19:36 +08:00
Nikita Titov 3f2f24a4bd fixed background of code pieces (#1715) 2018-10-02 09:39:03 +08:00
Nikita Titov eb131ead89
[docs] run pycodestyle for docs folder (#1687)
* run pytest for docs folder too

* fixed pylint error and some minor style issues
2018-09-21 23:18:48 +03:00
Guolin Ke 44ed4270ee [docs] auto year in copyright of ReadTheDocs (#1684) 2018-09-20 20:55:45 +03:00
Nikita Titov 7ed1ed3eb6 [docs] refined title RTD page and renamed js file (#1539)
* added definition of LightGBM to ReadTheDocs main page

* bold LightGBM

* Rename rst_links_fix.js to script.js

* fix js name in config
2018-07-23 11:00:15 +08:00