Commit Graph
100 Commits
Author SHA1 Message Date
Jiaming Yuan 300f9ace06 Fix default metric configuration. (#9575) 2023-09-13 13:05:47 -07:00
Jiaming Yuan b438d684d2 Utilities and cleanups for socket. (#9576)
- Use c++-17 nodiscard and nested ns.
- Add bind method to socket.
- Remove rabit parameters.
2023-09-14 01:41:42 +08:00
Jiaming Yuan 5abe50ff8c [R] Fix method name. (#9577) 2023-09-13 23:19:29 +08:00
Jiaming Yuan 9027686cac Support pandas 2.1.0. (#9557) 2023-09-11 17:44:51 +08:00
Jiaming Yuan 3b9e5909fb [CI] bump setup-r action version. (#9544) 2023-09-05 16:14:45 +08:00
Jiaming Yuan adea842c83 Fix inplace predict with fallback when base margin is used. (#9536)
- Copy meta info from proxy DMatrix.
- Use `std::call_once` to emit less warnings.
2023-09-05 01:04:24 +08:00
Jiaming Yuan ccfc90e4c6 [rabit] Improved connection handling. (#9531)
- Enable timeout.
- Report connection error from the system.
- Handle retry for both tracker connection and peer connection.
2023-08-30 13:00:04 +08:00
Jiaming Yuan ddf2e68821 Use the new DeviceOrd in the linalg module. (#9527) 2023-08-29 13:37:29 +08:00
Jiaming Yuan 942b957eef Fix GPU categorical split memory allocation. (#9529) 2023-08-29 10:06:03 +08:00
Jiaming Yuan be6a552956 [R] Support multi-class custom objective. (#9526) 2023-08-29 08:27:13 +08:00
Jiaming Yuan 90ef250ea1 [rabit] Drop support for MPI backend. (#9525)
- Add checks in cmake.
- Remove mpi related code.
2023-08-28 21:01:22 +08:00
Jiaming Yuan c3574d932f [R] Fix integer inputs with NA. (#9522) 2023-08-28 18:36:11 +08:00
Jiaming Yuan 1b87a1d8f8 [rabit] Small cleanup to tracker initialization. (#9524)
- Remove recover related code.
- Clean startup, no need to consider previously connected nodes.
2023-08-27 05:10:59 +08:00
Jiaming Yuan 209335b18c Remove the deprecated Python rabit module. (#9523) 2023-08-27 03:37:05 +08:00
Jiaming Yuan aa86bd5207 [dask] Filter models on worker. (#9518) 2023-08-25 20:23:47 +08:00
Jiaming Yuan 972730cde0 Use matrix for gradient. (#9508)
- Use the `linalg::Matrix` for storing gradients.
- New API for the custom objective.
- Custom objective for multi-class/multi-target is now required to return the correct shape.
- Custom objective for Python can accept arrays with any strides. (row-major, column-major)
2023-08-24 05:29:52 +08:00
Jiaming Yuan 8c10af45a0 Delay the check for vector leaf. (#9509) 2023-08-23 01:53:40 +08:00
Jiaming Yuan 3c09399f29 Fix device dispatch for linear updater. (#9507) 2023-08-23 00:17:35 +08:00
Jiaming Yuan 302bbdc958 mitigate flaky test with distributed l1 error. (#9499) 2023-08-22 13:46:35 +08:00
Jiaming Yuan 044fea1281 Drop support for loading remote files. (#9504) 2023-08-21 23:34:05 +08:00
Jiaming YuanandPhilip Hyunsu Cho e6cf7a1278 Deprecate the command line interface. (#9485)
---------

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2023-08-21 06:47:48 +08:00
Jiaming Yuan 38a3e1b858 Fix release script for RC [skip ci] (#9505) 2023-08-21 05:24:35 +08:00
Jiaming Yuan db87d481bc [R] Differentiate dev version with release version. (#9503)
Use 2.1.0.0 as development version, we will change it to 2.1.0.1 during release.
2023-08-20 02:58:58 +08:00
Jiaming Yuan 7f29a238e6 Return base score as intercept. (#9486) 2023-08-19 12:28:02 +08:00
Jiaming Yuan 58530b1bc4 Bump version to 2.1. (#9498) 2023-08-18 01:04:04 +08:00
Jiaming Yuan 5188e27513 Fix version parsing with rc release. (#9493) 2023-08-16 22:44:58 +08:00
Jiaming Yuan f380c10a93 Use hint for find nccl. (#9490) 2023-08-16 16:08:41 +08:00
Jiaming Yuan b2e93d2742 [doc] Quick note for the device parameter. [skip ci] (#9483) 2023-08-16 13:35:55 +08:00
Jiaming Yuan c061e3ae50 [jvm-packages] Bump rapids version. (#9482) 2023-08-15 16:26:42 -07:00
Jiaming Yuan 19b59938b7 Convert input to str for hypothesis note. (#9480) 2023-08-15 02:27:58 +08:00
Jiaming Yuan 05d7000096 Handle special characters in JSON model dump. (#9474) 2023-08-14 15:49:00 +08:00
Jiaming Yuan fd4335d0bf [doc] Document the current status of some features. (#9469) 2023-08-13 23:42:27 +08:00
Jiaming Yuan 801116c307 Test scikit-learn model IO with gblinear. (#9459) 2023-08-13 23:41:49 +08:00
Jiaming Yuan bb56183396 Normalize file system path. (#9463) 2023-08-11 21:26:46 +08:00
Jiaming Yuan bdc1a3c178 Fix pyspark parameter. (#9460)
- Don't pass the `use_gpu` parameter to the learner.
- Fix GPU approx with PySpark.
2023-08-11 19:07:50 +08:00
Jiaming Yuan 1caa93221a Use realloc for histogram cache and expose the cache limit. (#9455) 2023-08-10 14:05:27 +08:00
Jiaming Yuan a57371ef7c Fix links in R doc. (#9450) 2023-08-10 02:38:14 +08:00
Jiaming Yuan f05a23b41c Use weakref instead of id for DataIter cache. (#9445)
- Fix case where Python reuses id from freed objects.
- Small optimization to column matrix with QDM by using `realloc` instead of copying data.
2023-08-10 00:40:06 +08:00
Jiaming Yuan f05294a6f2 Fix clang warnings. (#9447)
- static function in header. (which is marked as unused due to translation unit
visibility).
- Implicit copy operator is deprecated.
- Unused lambda capture.
- Moving a temporary variable prevents copy elision.
2023-08-09 15:34:45 +08:00
Jiaming Yuan c1b2cff874 [CI] Check compiler warnings. (#9444) 2023-08-08 12:02:45 -07:00
Jiaming Yuan 97fd5207dd Use lambda function in ParallelFor2D. (#9441) 2023-08-08 14:04:46 +08:00
Jiaming Yuan 54029a59af Bound the size of the histogram cache. (#9440)
- A new histogram collection with a limit in size.
- Unify histogram building logic between hist, multi-hist, and approx.
2023-08-08 03:21:26 +08:00
Jiaming Yuan 1332ff787f Unify the code path between local and distributed training. (#9433)
This removes the need for a local histogram space during distributed training, which cuts the cache size by half.
2023-08-03 21:46:36 +08:00
Jiaming Yuan 7129988847 Accept only keyword arguments in data iterator. (#9431) 2023-08-03 12:44:16 +08:00
Jiaming Yuan e93a274823 Small cleanup for histogram routines. (#9427)
* Small cleanup for histogram routines.

- Extract hist train param from GPU hist.
- Make histogram const after construction.
- Unify parameter names.
2023-08-02 18:28:26 +08:00
Jiaming Yuan a9da2e244a [CI] Update github actions. (#9428) 2023-08-01 23:03:53 +08:00
Jiaming Yuan 912e341d57 Initial GPU support for the approx tree method. (#9414) 2023-07-31 15:50:28 +08:00
Jiaming Yuan 3a9996173e Revert "Switch to per-thread default stream (#9396)" (#9413)
This reverts commit f7f673b00c.
2023-07-24 12:03:28 -07:00
Jiaming Yuan a196443a07 Implement sketching with Hessian on GPU. (#9399)
- Prepare for implementing approx on GPU.
- Unify the code path between weighted and uniform sketching on DMatrix.
2023-07-24 15:43:03 +08:00
Jiaming YuanandPhilip Hyunsu Cho 851cba931e Define best_iteration only if early stopping is used. (#9403)
* Define `best_iteration` only if early stopping is used.

This is the behavior specified by the document but not honored in the actual code.

- Don't set the attributes if there's no early stopping.
- Clean up the code for callbacks, and replace assertions with proper exceptions.
- Assign the attributes when early stopping `save_best` is used.
- Turn the attributes into Python properties.

---------

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2023-07-24 12:43:35 +08:00
Jiaming Yuan 01e00efc53 [breaking] Remove support for single string feature info. (#9401)
- Input must be a sequence of strings.
- Improve validation error message.
2023-07-24 11:06:30 +08:00
Jiaming Yuan 275da176ba Document for device ordinal. (#9398)
- Rewrite GPU demos. notebook is converted to script to avoid committing additional png plots.
- Add GPU demos into the sphinx gallery.
- Add RMM demos into the sphinx gallery.
- Test for firing threads with different device ordinals.
2023-07-22 15:26:29 +08:00
Jiaming Yuan 22b0a55a04 Remove hist builder class. (#9400)
* Remove hist build class.

* Cleanup this stateless class.

* Add comment to thread block.
2023-07-22 10:43:12 +08:00
Jiaming Yuan 0de7c47495 Fix metric serialization. (#9405) 2023-07-22 08:39:21 +08:00
Jiaming Yuan dbd5309b55 Fix warning message for device. (#9402) 2023-07-20 23:30:04 +08:00
Jiaming Yuan 7a0ccfbb49 Add compute 90. (#9397) 2023-07-19 13:42:38 +08:00
Jiaming Yuan 0897477af0 Remove unmaintained jvm readme and dev scripts. (#9395) 2023-07-18 18:23:43 +08:00
Jiaming Yuan 6e18d3a290 [pyspark] Handle the device parameter in pyspark. (#9390)
- Handle the new `device` parameter in PySpark.
- Deprecate the old `use_gpu` parameter.
2023-07-18 08:47:03 +08:00
Jiaming Yuan f4fb2be101 [jvm-packages] Add the new device parameter. (#9385) 2023-07-17 18:40:39 +08:00
Jiaming Yuan 2caceb157d [jvm-packages] Reduce log verbosity for GPU tests. (#9389) 2023-07-17 13:25:46 +08:00
Jiaming Yuan b342ef951b Make feature validation immutable. (#9388) 2023-07-16 06:52:55 +08:00
Jiaming Yuan 0a07900b9f Fix integer overflow. (#9380) 2023-07-15 21:11:02 +08:00
Jiaming Yuan 16eb41936d Handle the new device parameter in dask and demos. (#9386)
* Handle the new `device` parameter in dask and demos.

- Check no ordinal is specified in the dask interface.
- Update demos.
- Update dask doc.
- Update the condition for QDM.
2023-07-15 19:11:20 +08:00
Jiaming Yuan 9da5050643 Turn warning messages into Python warnings. (#9387) 2023-07-15 07:46:43 +08:00
Jiaming Yuan 04aff3af8e Define the new device parameter. (#9362) 2023-07-13 19:30:25 +08:00
Jiaming Yuan 97ed944209 Unify the hist tree method for different devices. (#9363) 2023-07-11 10:04:39 +08:00
Jiaming Yuan 20c52f07d2 Support exporting cut values (#9356) 2023-07-08 15:32:41 +08:00
Jiaming Yuan 59787b23af Allow empty page in external memory. (#9361) 2023-07-08 09:24:35 +08:00
Jiaming Yuan 41c6813496 Preserve order of saved updaters config. (#9355)
- Save the updater sequence as an array instead of object.
- Warn only once.

The compatibility is kept, but we should be able to break it as the config is not loaded
in pickle model and it's declared to be not stable.
2023-07-05 20:20:07 +08:00
Jiaming Yuan b572a39919 [doc] Fix removed reference. (#9358) 2023-07-05 16:49:25 +08:00
Jiaming Yuan 645037e376 Improve test coverage with predictor configuration. (#9354)
* Improve test coverage with predictor configuration.

- Test with ext memory.
- Test with QDM.
- Test with dart.
2023-07-05 15:17:22 +08:00
Jiaming Yuan d0916849a6 Remove unused weight from buffer for cat features. (#9341) 2023-07-04 01:07:09 +08:00
Jiaming Yuan 6155394a06 Update news for 1.7.6 [skip ci] (#9350) 2023-07-04 01:04:34 +08:00
Jiaming Yuan e964654b8f [skl] Enable cat feature without specifying tree method. (#9353) 2023-07-03 22:06:17 +08:00
Jiaming Yuan 39390cc2ee [breaking] Remove the predictor param, allow fallback to prediction using DMatrix. (#9129)
- A `DeviceOrd` struct is implemented to indicate the device. It will eventually replace the `gpu_id` parameter.
- The `predictor` parameter is removed.
- Fallback to `DMatrix` when `inplace_predict` is not available.
- The heuristic for choosing a predictor is only used during training.
2023-07-03 19:23:54 +08:00
Jiaming Yuan f4798718c7 Use hist as the default tree method. (#9320) 2023-06-27 23:04:24 +08:00
Jiaming Yuan bc267dd729 Use ptr from mmap for GHistIndexMatrix and ColumnMatrix. (#9315)
* Use ptr from mmap for `GHistIndexMatrix` and `ColumnMatrix`.

- Define a resource for holding various types of memory pointers.
- Define ref vector for holding resources.
- Swap the underlying resources for GHist and ColumnM.
- Add documentation for current status.
- s390x support is removed. It should work if you can compile XGBoost, all the old workaround code does is to get GCC to compile.
2023-06-27 19:05:46 +08:00
Jiaming Yuan cfa9c42eb4 Fix callback in AFT viz demo. (#9333)
* Fix callback in AFT viz demo.

- Update the callback function.
- Add lint check.
2023-06-26 22:35:02 +08:00
Jiaming Yuan 6efe7c129f [doc] Update reference in R vignettes. (#9323) 2023-06-26 18:32:11 +08:00
Jiaming Yuan 54da4b3185 Cleanup to prepare for using mmap pointer in external memory. (#9317)
- Update SparseDMatrix comment.
- Use a pointer in the bitfield. We will replace the `std::vector<bool>` in `ColumnMatrix` with bitfield.
- Clean up the page source. The timer is removed as it's inaccurate once we swap the mmap pointer into the page.
2023-06-22 06:43:11 +08:00
Jiaming Yuan 4066d68261 [doc] Clarify early stopping. (#9304) 2023-06-20 17:56:47 +08:00
Jiaming Yuan 6d22ea793c Test QDM with sparse data on CPU. (#9316) 2023-06-19 21:27:03 +08:00
Jiaming Yuan ee6809e642 Use mmap for external memory. (#9282)
- Have basic infrastructure for mmap.
- Release file write handle.
2023-06-19 18:52:55 +08:00
Jiaming Yuan 152e2fb072 Unify test helpers for creating ctx. (#9274) 2023-06-10 03:35:22 +08:00
Jiaming Yuan ea0deeca68 Disable dense optimization in hist for distributed training. (#9272) 2023-06-10 02:31:34 +08:00
Jiaming Yuan 1fcc26a6f8 Set ndcg to default for LTR. (#8822)
- Add document.
- Add tests.
- Use `ndcg` with `topk` as default.
2023-06-09 23:31:33 +08:00
Jiaming Yuan 0cba2cdbb0 Support linalg data structures in check device. (#9243) 2023-06-06 09:47:24 +08:00
Jiaming Yuan fc8110ef79 Remove document and demo in RABIT. (#9246) 2023-06-06 08:20:10 +08:00
Jiaming Yuan 9fbde21e9d Rework the precision metric. (#9222)
- Rework the precision metric for both CPU and GPU.
- Mention it in the document.
- Cleanup old support code for GPU ranking metric.
- Deterministic GPU implementation.

* Drop support for classification.

* type.

* use batch shape.

* lint.

* cpu build.

* cpu build.

* lint.

* Tests.

* Fix.

* Cleanup error message.
2023-06-02 20:49:43 +08:00
Jiaming Yuan aba4559c4f [doc] Update dask demo. (#9201) 2023-05-31 05:01:02 +08:00
Jiaming Yuan 7f20eaed93 [doc] Troubleshoot nccl shared memory. [skip ci] (#9206) 2023-05-31 05:00:02 +08:00
Jiaming Yuan 62e9387cd5 [ci] Update PySpark version. (#9214) 2023-05-31 03:00:44 +08:00
Jiaming Yuan 17fd3f55e9 Optimize adapter element counting on GPU. (#9209)
- Implement a simple `IterSpan` for passing iterators with size.
- Use shared memory for column size counts.
- Use one thread for each sample in row count to reduce atomic operations.
2023-05-30 23:28:43 +08:00
Jiaming Yuan 097f11b6e0 Support CUDA f16 without transformation. (#9207)
- Support f16 from cupy.
- Include CUDA header explicitly.
- Cleanup cmake nvtx support.
2023-05-30 20:54:31 +08:00
Jiaming Yuan ae7450ce54 Skip optional synchronization in thrust. (#9212) 2023-05-30 17:23:09 +08:00
Jiaming Yuan 03bc6e6427 Remove unused variables. (#9210)
- remove used variables.
- Remove signed comparison warnings.
2023-05-28 05:24:15 +08:00
Jiaming Yuan 8c174ef2d3 [CI] Update images that are not related to binary release. (#9205)
* [CI] Update images that are not related to the binary release.

- Update clang-tidy, prefer tools from the Ubuntu repository.
- Update GPU image to 22.04.
- Small cleanup to the tidy script.
- Remove gpu_jvm, which seems to be unused.
2023-05-27 17:40:46 +08:00
Jiaming Yuan 053aababd4 Avoid thrust logical operation. (#9199)
Thrust implementation of `thrust::all_of/any_of/none_of` adopts an early stopping strategy
to bailout early by dividing the input into small batches. This is not ideal for data
validation as we expect all data to be valid. The strategy leads to excessive kernel
launches and stream synchronization.

* Use reduce from dh instead.
2023-05-27 01:36:58 +08:00
Jiaming Yuan 3913ff470f Import data lazily during tests. (#9176) 2023-05-23 03:58:31 +08:00
Jiaming Yuan e4129ed6ee [jvm-packages] Remove akka in tester. (#9149) 2023-05-10 14:10:58 +08:00