1. 17 Mar, 2022 1 commit
    • Antoni Baum's avatar
      [python] make `early_stopping` callback pickleable (#5012) · f77e0adf
      Antoni Baum authored
      * Turn `early_stopping` into a Callable class
      
      * Fix
      
      * Lint
      
      * Remove print
      
      * Fix order
      
      * Revert "Lint"
      
      This reverts commit 7ca8b557572446888cf793c0082d9a7efd1e29a7.
      
      * Apply suggestion from code review
      
      * Nit
      
      * Lint
      
      * Move callable class outside the func for pickling
      
      * Move _pickle and _unpickle to tests utils
      
      * Add early stopping callback picklability test
      
      * Nit
      
      * Fix
      
      * Lint
      
      * Improve type hint
      
      * Lint
      
      * Lint
      
      * Add cloudpickle to test_windows
      
      * Update tests/python_package_test/test_engine.py
      
      * Fix
      
      * Apply suggestions from code review
      f77e0adf
  2. 23 Feb, 2022 1 commit
    • José Morales's avatar
      [python-package] use 2d collections for predictions, grads and hess in... · d670a4d6
      José Morales authored
      [python-package] use 2d collections for predictions, grads and hess in multiclass custom objective (#4925)
      
      * reshape predictions, grad and hess in multiclass custom objective
      
      * add sklearn test. move custom obj to utils. docs for numpy
      
      * use num_model_per_iteration to get num_classes
      
      * update docs and dask multiclass custom objective test
      
      * move reshaping to __inner_predict. add test for feval
      
      * add missing note. remove extra line
      d670a4d6
  3. 12 Feb, 2022 1 commit
  4. 17 Jan, 2022 1 commit
  5. 06 Dec, 2021 1 commit
  6. 05 Dec, 2021 1 commit
  7. 02 Dec, 2021 1 commit
  8. 30 Nov, 2021 1 commit
  9. 17 Sep, 2021 1 commit
    • José Morales's avatar
      [python-package] Support 2d collections as input for `init_score` in... · f1f5ba15
      José Morales authored
      
      [python-package] Support 2d collections as input for `init_score` in multiclass classification task (#4150)
      
      * initial implementation of init_score for multiclass classification
      
      * check for 1d or 2d collection in init_score
      
      * remove dataset import
      
      * initial comments
      
      * update dask test and docstrings
      
      * update docstrings
      
      * move logic to set_field. reshape back on get_field
      
      * add type hints and update docstrings for dask. fix Dataset.set_field
      
      * revert wrong docstrings and type hints
      
      * add extra comma for consistency
      
      * prefix private functions with underscore
      
      add type hints to new functions
      
      make commas consistent in dask and basic
      
      * add missing spaces after type hint
      
      * remove shape condition for dataframe in is_2d_collection
      Co-authored-by: default avatarNikita Titov <nekit94-12@hotmail.com>
      f1f5ba15
  10. 09 Sep, 2021 2 commits
  11. 09 Aug, 2021 1 commit
  12. 03 Aug, 2021 1 commit
  13. 10 Jul, 2021 1 commit
  14. 07 Jul, 2021 1 commit
    • James Lamb's avatar
      [dask] Make output of feature contribution predictions for sparse matrices... · b09da434
      James Lamb authored
      
      [dask] Make output of feature contribution predictions for sparse matrices match those from sklearn estimators (fixes #3881) (#4378)
      
      * test_classifier working
      
      * adding tests
      
      * docs
      
      * tests
      
      * revert unnecessary changes in tests
      
      * test output type
      
      * linting
      
      * linting
      
      * use from_delayed() instead
      
      * docstring pycodestyle is happy with
      
      * isort
      
      * put pytest skips back
      
      * respect sparse return type
      
      * fix doc
      
      * remove unnecessary dask_array_concatenate()
      
      * Apply suggestions from code review
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Apply suggestions from code review
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * update predict_proba() docstring
      
      * remove unnecessary np.array()
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * fix assertion
      
      * fix test use of len()
      
      * restore np.array() in tests
      
      * use np.asarray() instead
      
      * use toarray()
      
      * remove empty functions in compat
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      b09da434
  15. 04 Jul, 2021 1 commit
  16. 28 Jun, 2021 1 commit
    • Frank Fineis's avatar
      [dask] add support for eval sets and custom eval functions (#4101) · b5502d19
      Frank Fineis authored
      
      
      * es WiP, need to add eval_sample_weight and eval_group
      
      * add weight, group to dask es. WiP.
      
      * dask es reorg
      
      * Update python-package/lightgbm/dask.py
      
      _train_part model.fit args to lines
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update tests/python_package_test/test_dask.py
      
      _train_part model.fit args to lines, pt2
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update python-package/lightgbm/dask.py
      
      _train_part model.fit args to lines pt3
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update tests/python_package_test/test_dask.py
      
      dask_model.fit args to lines
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update tests/python_package_test/test_dask.py
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update python-package/lightgbm/dask.py
      
      use is instead of id()
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update tests/python_package_test/test_dask.py
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update tests/python_package_test/test_dask.py
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      
      * applying changes to eval_set PR WiP
      
      * dask support for eval_names, eval_metric, eval_stopping_rounds
      
      * add evals_result checks and other eval_set attribute-related test checks. need to merge master - WiP
      
      * fix lint errors in test_dask.py
      
      * drop group_shape from _lgbmmodel_doc_fit.format for non-rankers, add support for eval_at for dask ranker
      
      * add eval_at to test_dask eval_set ranker tests
      
      * add back group_shape to lgbmmmodel docs, tighten tests
      
      * drop random eval weights from early stopping, probably causing training to terminate too early
      
      * add eval data templates to sklearn fit docs, add eval data docs to dask
      
      * add n_features to _create_data, eval_set tests stop w/ desirable tree counts
      
      * import alphabetically
      
      * add back get_worker for eval_set error handling
      
      * test_dask argmin typo
      
      * push forgotten eval_names bugfix
      
      * eval_stopping_rounds -> early_stopping_rounds, fix failing non-es test
      
      * change default eval_at to tuple 1-5
      
      * re-drop get_worker
      
      * drop early stopping support from eval_set commits, move eval_set worker check prior to client.submit
      
      * add eval_class_weight and eval_init_score to lightgbm/dask, WiP
      
      * clean up eval_set tests, allow user to specify fewer eval_names, clswghts than eval_sets
      
      * remove redundant backslash
      
      * lint fixes
      
      * fix eval_at, eval_metric duplication, let eval_at be Iterable not just Tuple
      
      * use all data_outputs for test_eval_set tests
      
      * undo newlines from first pr
      
      * add custom_eval_metric test, correct issue with eval_at and metric names
      
      * move _constant_metric outside of test
      
      * dataset reference names instead of __strings__
      
      * add padding to eval_set parts makes each part has same len(eval_set)
      
      * eval set code clean up
      
      * revert n_evals to be max len eval_set across all parts on worker
      
      * pylint errors in _DatasetNames
      
      * more pylint fixes
      
      * pylinting...
      
      * add by pytest.mark, mistakenly deleted during merge conflict resolution
      
      * address code review comments
      
      * add _pad_eval_names to handle nondeterministic evals_result_ valid set names
      
      * change not evaluated evals_result_ test criteria
      
      * address fit eval docs issues, switch _DatasetNames to Enum
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * Update python-package/lightgbm/dask.py
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * update eval_metrics, eval_at dask fit docstr to match sklearn, make tests reflect that l2 (rmse), logloss in evals_result_ by default
      
      * address eval_set dict keys naming in docstr and training eval_set naming issue
      
      * in test_dask check for obj-default metric names in eval_results, remove check for training key
      
      * lint fixes for _pad_eval_names
      
      * remove unnecessary breaklinen in _pad_eval_names docstr
      
      * use Enum.member syntax not Enum.member.name
      
      * remove str from supported eval_at types
      
      * add whitespace and remove DaskDataframes mention from eval_ param docstrs in _train
      
      * remove "of shape = [n_samples]" from group_shape docs
      
      * add eval_at base_doc in DaskLGBMRanker.fit
      
      * remove excess paren from eval_names docs in _train
      
      * make requested changes to test_dask.py
      
      * remove Optional() wrapper on eval_at
      
      * add _lgbmmodel_doc_custom_eval_note to dask.py fit.__doc__
      
      * fix ordering of .sklearn imports to attempt lint fix
      
      * dask custom eval note to f-string pt1
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * dask custom eval note to f-string pt 2
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      
      * dask custom eval note to f-string pt 3
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      Co-authored-by: default avatarJames Lamb <jaylamb20@gmail.com>
      Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
      b5502d19
  17. 27 Jun, 2021 1 commit
  18. 26 Jun, 2021 1 commit
  19. 12 Jun, 2021 1 commit
  20. 09 Jun, 2021 1 commit
  21. 21 May, 2021 1 commit
  22. 05 Apr, 2021 1 commit
  23. 01 Apr, 2021 2 commits
    • jmoralez's avatar
      [tests][dask] Add voting_parallel algorithm in tests (fixes #3834) (#4088) · d517ba12
      jmoralez authored
      * include voting_parallel tree_learner in test_regressor, test_classifier and test_ranker
      
      * remove test for warnings and test for error when using feature_parallel
      
      * use real names for tree_learner intest and include test for aliases. use the error message in the test for error in feature parallel
      
      * split all tests with rf in test_classifier
      
      * remove task parametrization for tree_learner aliases test. smaller input data from feature_parallel error
      
      * define task for tree_learner aliases
      d517ba12
    • jmoralez's avatar
      46a20ab0
  24. 31 Mar, 2021 1 commit
  25. 30 Mar, 2021 1 commit
  26. 27 Mar, 2021 2 commits
  27. 26 Mar, 2021 1 commit
  28. 16 Mar, 2021 1 commit
  29. 15 Mar, 2021 1 commit
  30. 10 Mar, 2021 2 commits
  31. 04 Mar, 2021 1 commit
    • jmoralez's avatar
      [dask] Include support for init_score (#3950) · 37e98782
      jmoralez authored
      * include support for init_score
      
      * use dataframe from init_score and test difference with and without init_score in local model
      
      * revert refactoring
      
      * initial docs. test between distributed models with and without init_score
      
      * remove ranker from tests
      
      * test value for root node and change docs
      
      * comma
      
      * re-include parametrize
      
      * fix incorrect merge
      
      * use single init_score and the booster_ attribute
      
      * use np.float64 instead of float
      37e98782
  32. 02 Mar, 2021 1 commit
  33. 24 Feb, 2021 3 commits
    • Nikita Titov's avatar
      [tests][dask] simplify fit calls in Dask tests (#4018) · 3ab6bbf9
      Nikita Titov authored
      * simplify fit calls in Dask tests
      
      * Update .vsts-ci.yml
      
      * Update .vsts-ci.yml
      3ab6bbf9
    • jmoralez's avatar
      [dask][python-package] include support for column array as label (#3943) · 5dacd603
      jmoralez authored
      * include support for column array as label
      
      * remove nested ifs
      
      * fix linting errors
      
      * include tests for sklearn regressors
      
      * include docstring for numpy_1d_array_to_dtype
      
      * include . at end of docstring
      
      * remove pandas import and test for regression, classification and ranking
      
      * check predictions of sklearn models as well
      
      * test training only in dask. drop pandas series tests
      
      * use PANDAS_INSTALLED and pd_Series
      
      * inline imports
      
      * use col array in fit for test_dask
      
      * include review comments
      5dacd603
    • jmoralez's avatar
      [dask] use random ports in network setup (#3823) · 0e576575
      jmoralez authored
      * use socket.bind with port 0 and client.run to find random open ports
      
      * include test for found ports
      
      * find random open ports as default
      
      * parametrize local_listen_port. type hint to _find_random_open_port. fid open ports only on workers with data.
      
      * make indentation consistent and pass list of workers to client.run
      
      * remove socket import
      
      * change random port implementation
      
      * fix test
      0e576575
  34. 23 Feb, 2021 1 commit