Test federated plugin using GitHub action. (#10336)

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
Jiaming Yuan
2024-05-29 02:28:14 +08:00
committed by GitHub
parent 7ae5c972f9
commit 7354955cbb
4 changed files with 27 additions and 27 deletions

View File

@@ -1,33 +1,16 @@
XGBoost Plugin for Federated Learning
=====================================
This folder contains the plugin for federated learning. Follow these steps to build and test it.
This folder contains the plugin for federated learning.
Install gRPC
------------
Refer to the [installation guide from the gRPC website](https://grpc.io/docs/languages/cpp/quickstart/).
See [build instruction](../../doc/build.rst) for how to build the plugin.
Build the Plugin
----------------
```shell
# Under xgboost source tree.
mkdir build
cd build
cmake .. -GNinja \
-DPLUGIN_FEDERATED=ON \
-DUSE_CUDA=ON\
-DUSE_NCCL=ON
ninja
cd ../python-package
pip install -e .
```
If CMake fails to locate gRPC, you may need to pass `-DCMAKE_PREFIX_PATH=<grpc path>` to CMake.
Test Federated XGBoost
----------------------
```shell
# Under xgboost source tree.
cd tests/distributed
cd tests/distributed/test_federated
# This tests both CPU training (`hist`) and GPU training (`gpu_hist`).
./runtests-federated.sh
```