Commit Graph
100 Commits
Author SHA1 Message Date
Jiaming Yuan 26209a42a5 Define git attributes for renormalization. (#8921) 2023-03-16 02:43:11 +08:00
Jiaming Yuan f186c87cf9 Check inf in data for all types of DMatrix. (#8911) 2023-03-15 11:24:35 +08:00
Jiaming Yuan 72e8331eab Reimplement the NDCG metric. (#8906)
- Add support for non-exp gain.
- Cache the DMatrix object to avoid re-calculating the IDCG.
- Make GPU implementation deterministic. (no atomic add)
2023-03-15 03:26:17 +08:00
Jiaming Yuan 8685556af2 Implement hist evaluator for multi-target tree. (#8908) 2023-03-15 01:42:51 +08:00
Jiaming Yuan 95e2baf7c2 [doc] Fix typo [skip ci] (#8907) 2023-03-15 00:55:17 +08:00
Jiaming Yuan 910ce580c8 Clear all cache after model load. (#8904) 2023-03-14 22:09:36 +08:00
Jiaming Yuan c400fa1e8d Predictor for vector leaf. (#8898) 2023-03-14 19:07:10 +08:00
Jiaming Yuan 8be6095ece Implement NDCG cache. (#8893) 2023-03-13 22:16:31 +08:00
Jiaming Yuan 9bade7203a Remove public access to tree model param. (#8902)
* Make tree model param a private member.
* Number of features and targets are immutable after construction.

This is to reduce the number of places where we can run configuration.
2023-03-13 20:55:10 +08:00
Jiaming Yuan 5ba3509dd3 Define multi expand entry. (#8895) 2023-03-13 19:31:05 +08:00
Jiaming Yuan bbee355b45 [doc][dask] Note on reproducible result. [skip ci] (#8903) 2023-03-13 19:30:35 +08:00
Jiaming YuanandPhilip Hyunsu Cho 3689695d16 [CI] Run RMM gtests. (#8900)
* [CI] Run RMM gtests.

* Update test-cpp-gpu.sh

---------

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2023-03-12 03:14:31 +08:00
Jiaming Yuan 36a7396658 Replace dmlc any with std any. (#8892) 2023-03-11 06:11:04 +08:00
Jiaming Yuan 2aa838c75e Define multi-strategy parameter. (#8890) 2023-03-11 02:58:01 +08:00
Jiaming Yuan 6deaec8027 Pass obj info by reference instead of by value. (#8889)
- Pass obj info into tree updater as const pointer.

This way we don't have to initialize the learner model param before configuring gbm, hence
breaking up the dependency of configurations.
2023-03-11 01:38:28 +08:00
Jiaming Yuan 54e001bbf4 [doc][dask] Reference examples from coiled. [skip ci] (#8891) 2023-03-09 20:03:24 -08:00
Jiaming Yuan c5c8f643f2 Remove the cub submodule. (#8888)
XGBoost now uses CTK-11.8 for binary packages, there's no need to maintain a cub
submodule anymore.
2023-03-09 19:43:02 -08:00
Jiaming Yuan 5feee8d4a9 Define core multi-target regression tree structure. (#8884)
- Define a new tree struct embedded in the `RegTree`.
- Provide dispatching functions in `RegTree`.
- Fix some c++-17 warnings about the use of nodiscard (currently we disable the warning on
  the CI).
- Use uint32_t instead of size_t for `bst_target_t` as it has a defined size and can be used
  as part of dmlc parameter.
- Hide the `Segment` struct inside the categorical split matrix.
2023-03-09 19:03:06 +08:00
Jiaming Yuan 46dfcc7d22 Define a new ranking parameter. (#8887) 2023-03-09 17:46:24 +08:00
Jiaming Yuan 8c16da8863 [doc] Add note for rabit port. [skip ci] (#8879) 2023-03-08 19:00:10 +08:00
Jiaming Yuan f236640427 Support F order for the tensor type. (#8872)
- Add F order support for tensor and view.
- Use parameter pack for automatic type cast. (avoid excessive static cast for shape).
2023-03-08 03:27:49 +08:00
Jiaming Yuan f7ce0ec0df Upgrade gcc toolchain to 9.x. (#8878)
* Use new tool chain.

* Use gcc-9.

* Use cmake from system.

* DOn't link leak.
2023-03-07 08:25:23 -08:00
Jiaming Yuan 7eba285a1e Support sklearn cross validation for ranker. (#8859)
* Support sklearn cross validation for ranker.

- Add a convention for X to include a special `qid` column.

sklearn utilities consider only `X`, `y` and `sample_weight` for supervised learning
algorithms, but we need an additional qid array for ranking.

It's important to be able to support the cross validation function in sklearn since all
other tuning functions like grid search are based on cross validation.
2023-03-07 00:22:08 +08:00
Jiaming Yuan cad7401783 Disable gcc parallel extension if openmp is not available. (#8871)
`<parallel/algorithm>` internally includes the <omp.h> header, which leads to an error
when openmp is not available.
2023-03-06 22:51:06 +08:00
Jiaming Yuan 228a46e8ad Support learning rate for zero-hessian objectives. (#8866) 2023-03-06 20:33:28 +08:00
Jiaming Yuan 173096a6a7 Discover libasan.so.6. (#8864) 2023-03-06 18:56:54 +08:00
Jiaming Yuan 6a892ce281 Specify src path for isort. (#8867) 2023-03-06 17:30:27 +08:00
Jiaming Yuan 4d665b3fb0 Restore clang tidy test. (#8861) 2023-03-03 13:47:04 -08:00
Jiaming Yuan 803d5e3c4c Update c++ requirement to 17 for the R package. (#8860) 2023-03-01 14:49:39 -08:00
Jiaming Yuan d54ef56f6f Fix cache with gc (#8851)
- Make DMatrixCache thread-safe.
- Remove the use of thread-local memory.
2023-03-01 00:39:06 +08:00
Jiaming Yuan c0afdb6786 Fix CPU bin compression with categorical data. (#8809)
* Fix CPU bin compression with categorical data.

* The bug causes the maximum category to be lesser than 256 or the maximum number of bins when
the input data is dense.
2023-02-16 04:20:34 +08:00
Jiaming Yuan cce4af4acf Initial support for quantile loss. (#8750)
- Add support for Python.
- Add objective.
2023-02-16 02:30:18 +08:00
Jiaming Yuan 282b1729da Specify the number of threads for parallel sort. (#8735)
* Specify the number of threads for parallel sort.

- Pass context object into argsort.
- Replace macros with inline functions.
2023-02-16 00:20:19 +08:00
Jiaming Yuan c7c485d052 Extract fit intercept. (#8793) 2023-02-15 22:41:31 +08:00
Jiaming Yuan 594371e35b Fix CPP lint. (#8807) 2023-02-15 20:16:35 +08:00
Jiaming Yuan e62167937b [CI] Update action cache for jvm tests. (#8806) 2023-02-15 18:43:48 +08:00
Jiaming Yuan 52d0230b58 Fix merge conflict. (#8791) 2023-02-13 23:43:42 +08:00
Jiaming Yuan 81b2ee1153 Pass DMatrix into metric for caching. (#8790) 2023-02-13 22:15:05 +08:00
Jiaming Yuan 31d3ec07af Extract device algorithms. (#8789) 2023-02-13 20:53:53 +08:00
Jiaming Yuan 457f704e3d Add quantile metric. (#8761) 2023-02-13 19:07:40 +08:00
Jiaming YuanandPhilip Hyunsu Cho d11a0044cf Generalize prediction cache. (#8783)
* Extract most of the functionality into `DMatrixCache`.
* Move API entry to independent file to reduce dependency on `predictor.h` file.
* Add test.

---------

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2023-02-13 12:36:43 +08:00
Jiaming Yuan 225b3158f6 Support custom metric in sklearn ranker. (#8786) 2023-02-12 13:14:07 +08:00
Jiaming Yuan 17b709acb9 Rename ranking utils to threading utils. (#8785) 2023-02-12 05:41:18 +08:00
Jiaming Yuan 70c9b885ef Extract floating point rounding routines. (#8771) 2023-02-12 04:26:41 +08:00
Jiaming Yuan e9c178f402 [doc] Document update [skip ci] (#8784)
- Remove version specifics in cat demo.
- Remove aws yarn.
- Update faq.
- Stop mentioning MPI.
- Update sphinx inventory links.
- Fix typo.
2023-02-12 04:25:22 +08:00
Jiaming Yuan 8a16944664 Fix ranking with quantile dmatrix and group weight. (#8762) 2023-02-10 20:32:35 +08:00
Jiaming Yuan 199c421d60 Send default configuration from metric to objective. (#8760) 2023-02-09 20:18:07 +08:00
Jiaming Yuan 5f76edd296 Extract make metric name from ranking metric. (#8768)
- Extract the metric parsing routine from ranking.
- Add a test.
- Accept null for string view.
2023-02-09 18:30:21 +08:00
Jiaming Yuan 4ead65a28c Increase timeout limit for linear. (#8767) 2023-02-09 18:20:12 +08:00
Jiaming Yuan 48cefa012e Support multiple alphas for segmented quantile. (#8758) 2023-02-07 17:17:59 +08:00
Jiaming Yuan c4802bfcd0 Cleanup booster param types. (#8756) 2023-02-07 15:52:19 +08:00
Jiaming Yuan 7b3d473593 [doc] Add demo for inference using individual tree. (#8752) 2023-02-07 04:40:18 +08:00
Jiaming Yuan 28bb01aa22 Extract optional weight. (#8747)
- Extract optional weight from coommon.h to reduce dependency on this header.
- Add test.
2023-02-07 03:11:53 +08:00
Jiaming Yuan 0f37a01dd9 Require black formatter for the python package. (#8748) 2023-02-07 01:53:33 +08:00
Jiaming Yuan a2e433a089 Fix empty DMatrix with categorical features. (#8739) 2023-02-07 00:40:11 +08:00
Jiaming Yuan c1786849e3 Use array interface for CSC matrix. (#8672)
* Use array interface for CSC matrix.

Use array interface for CSC matrix and align the interface with CSR and dense.

- Fix nthread issue in the R package DMatrix.
- Unify the behavior of handling `missing` with other inputs.
- Unify the behavior of handling `missing` around R, Python, Java, and Scala DMatrix.
- Expose `num_non_missing` to the JVM interface.
- Deprecate old CSR and CSC constructors.
2023-02-05 01:59:46 +08:00
Jiaming Yuan 0e61ba57d6 Fix GPU L1 error. (#8749) 2023-02-04 03:02:00 +08:00
Jiaming Yuan 1325ba9251 Support primitive types of pyarrow-backed pandas dataframe. (#8653)
Categorical data (dictionary) is not supported at the moment.
2023-01-30 17:53:29 +08:00
Jiaming Yuan 3760cede0f Consistent use of context to specify number of threads. (#8733)
- Use context in all tests.
- Use context in R.
- Use context in C API DMatrix initialization. (0 threads is used as dft).
2023-01-30 15:25:31 +08:00
Jiaming Yuan 21a28f2cc5 Small refactor for hist builder. (#8698)
- Use span instead of vector as parameter. No perf change as the builder work on pointer.
- Use const pointer for reg tree.
2023-01-30 14:06:41 +08:00
Jiaming Yuan 9fb12b20a4 Cleanup the callback module. (#8702)
- Cleanup pylint markers.
- run formatter.
- Update examples of using callback.
2023-01-22 00:13:49 +08:00
Jiaming Yuan 34eee56256 Fix compiler warnings. (#8703)
Fix warnings about signed/unsigned comparisons.
2023-01-21 15:16:23 +08:00
Jiaming Yuan e49e0998c0 Extract CPU sampling routines. (#8697) 2023-01-19 23:28:18 +08:00
Jiaming Yuan 7a068af1a3 Workaround CUDA warning. (#8696) 2023-01-19 09:16:08 +08:00
Jiaming Yuan 4416452f94 Return single thread from context when called inside omp region. (#8693) 2023-01-18 09:23:37 +08:00
Jiaming Yuan 31b9cbab3d Make sure input numpy array is aligned. (#8690)
- use `np.require` to specify that the alignment is required.
- scipy csr as well.
- validate input pointer in `ArrayInterface`.
2023-01-18 08:12:13 +08:00
Jiaming Yuan 175986b739 [doc] Add missing document for pyspark ranker. [skip ci] (#8692) 2023-01-18 07:52:18 +08:00
Jiaming Yuan 247946a875 Cache transformed in QuantileDMatrix for efficiency. (#8666) 2023-01-17 06:02:40 +08:00
Jiaming Yuan 43152657d4 Extract JSON type check. (#8677)
- Reuse it in `GetMissing`.
- Add test.
2023-01-17 03:11:07 +08:00
Jiaming Yuan 9f598efc3e Rename context in Metric. (#8686) 2023-01-17 01:10:13 +08:00
Jiaming Yuan d6018eb4b9 Remove all use of DeviceQuantileDMatrix. (#8665) 2023-01-17 00:04:10 +08:00
Jiaming Yuan 0ae8df9a65 Define default ctors for gpair. (#8660)
* Define default ctors for gpair.

Fix clang warning:

Definition of implicit copy assignment operator for 'GradientPairInternal<float>' is
deprecated because it has a user-declared copy constructor
2023-01-16 22:52:13 +08:00
Jiaming Yuan e7d612d22c [R] Fix threads used to create DMatrix in predict. (#8681) 2023-01-15 03:09:08 +08:00
Jiaming Yuan f7a2f52136 [R] Get CXX flags from R CMD config. (#8669) 2023-01-14 16:48:21 +08:00
Jiaming Yuan 07cf3d3e53 Fix threads in DMatrix slice. (#8667) 2023-01-14 07:16:57 +08:00
Jiaming Yuan e27cda7626 [CI] Skip pyspark sparse tests. (#8675) 2023-01-14 05:37:00 +08:00
Jiaming Yuan b2b6a8aa39 [R] fix CSR input. (#8673) 2023-01-14 01:32:41 +08:00
Jiaming Yuan cfa994d57f Multi-target support for L1 error. (#8652)
- Add matrix support to the median function.
- Iterate through each target for quantile computation.
2023-01-11 05:51:14 +08:00
Jiaming Yuan badeff1d74 Init estimation for regression. (#8272) 2023-01-11 02:04:56 +08:00
Jiaming Yuan 1b58d81315 [doc] Document Python inputs. (#8643) 2023-01-10 15:39:32 +08:00
Jiaming Yuan 06a1cb6e03 Release news for patch releases including upcoming 1.7.3. [skip ci] (#8645) 2023-01-06 16:19:16 +08:00
Jiaming Yuan e68a152d9e Do not return internal value for get_params. (#8634) 2023-01-05 17:48:26 +08:00
Jiaming Yuan 26c9882e23 Fix loading GPU pickle with a CPU-only xgboost distribution. (#8632)
We can handle loading the pickle on a CPU-only machine if the XGBoost is built with CUDA
enabled (Linux and Windows PyPI package), but not if the distribution is CPU-only (macOS
PyPI package).
2023-01-05 02:14:30 +08:00
Jiaming Yuan beefd28471 Split up SHAP from RegTree. (#8612)
* Split up SHAP from `RegTree`.

Simplify the tree interface.
2023-01-04 18:17:47 +08:00
Jiaming Yuan d308124910 Refactor PySpark tests. (#8605)
- Convert classifier tests to pytest tests.
- Replace hardcoded tests.
2023-01-04 17:05:16 +08:00
Jiaming Yuan 6eaddaa9c3 [CI] Fix CI with updated dependencies. (#8631)
* [CI] Fix CI with updated dependencies.

- Fix jvm package get iris.

* Skip SHAP test for now.

* Revert "Skip SHAP test for now."

This reverts commit 9aa28b4d8aee53fa95d92d2a879c6783ff4b2faa.

* Catch all exceptions.
2023-01-03 21:04:04 -08:00
Jiaming Yuan 8d545ab2a2 Implement fit stump. (#8607) 2023-01-04 04:14:51 +08:00
Jiaming Yuan c430ae52f3 Fix mypy errors with the latest numpy. (#8617) 2022-12-21 01:42:05 -08:00
Jiaming Yuan c6a8754c62 Define CUDA Context. (#8604)
We will transition to non-default and non-blocking CUDA stream.
2022-12-20 15:15:07 +08:00
Jiaming Yuan f6effa1734 Support Series and Python primitives in inplace_predict and QDM (#8547) 2022-12-17 00:15:15 +08:00
Jiaming Yuan a10e4cba4e Fix linalg iterator. (#8603) 2022-12-16 23:05:03 +08:00
Jiaming Yuan 38887a1876 Fix windows build on buildkite. (#8602) 2022-12-16 21:12:24 +08:00
Jiaming Yuan 43a647a4dd Fix inference with categorical feature. (#8591) 2022-12-15 17:57:26 +08:00
Jiaming Yuan 001e663d42 Set enable_categorical to True in predict. (#8592) 2022-12-15 05:27:06 +08:00
Jiaming YuanandPhilip Hyunsu Cho 40343c8ee1 Test dask demos. (#8557)
Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2022-12-13 18:37:31 +08:00
Jiaming Yuan deb3edf562 Support list and tuple for QDM. (#8542) 2022-12-10 01:14:44 +08:00
Jiaming Yuan 8824b40961 Update date in release script. [skip ci] (#8574) 2022-12-09 23:16:10 +08:00
Jiaming Yuan 3e26107a9c Rename and extract Context. (#8528)
* Rename `GenericParameter` to `Context`.
* Rename header file to reflect the change.
* Rename all references.
2022-12-07 04:58:54 +08:00
Jiaming Yuan e38fe21e0d Cleanup regression objectives. (#8539) 2022-12-07 01:05:42 +08:00
Jiaming Yuan d99bdd1b1e [CI] Fix github action mismatched glibcxx. (#8551)
* [CI] Fix github action mismatched glibcxx.

Split up the Linux test to use the toolchain from conda forge.
2022-12-06 17:42:15 +08:00