Skip to content

Commit

Permalink
Update xgboost example and ci (#2794)
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanTingHsieh authored Aug 14, 2024
1 parent 2d731b9 commit 35830dd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"path": "nvflare.app_opt.xgboost.histogram_based_v2.fed_controller.XGBFedController",
"args": {
"num_rounds": "{num_rounds}",
"training_mode": "horizontal",
"split_mode": 0,
"secure_training": false,
"xgb_params": {
"max_depth": 8,
"eta": 0.1,
Expand Down
3 changes: 2 additions & 1 deletion examples/advanced/xgboost/utils/prepare_job_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def job_config_args_parser():
parser.add_argument(
"--tree_method", type=str, default="hist", help="tree_method for xgboost - use hist for best perf"
)
parser.add_argument("--training_mode", type=str, default="horizontal", help="histogram_v2 training mode")
parser.add_argument("--split_mode", type=int, default=0, help="dataset split mode, 0 or 1")
parser.add_argument("--secure_training", type=bool, default=False, help="histogram_v2 secure training or not")
return parser


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tests:
--out_path "/tmp/nvflare/xgboost_higgs_dataset/2_uniform"
- python3 ../../examples/advanced/xgboost/utils/prepare_job_config.py
--site_num 2
--training_mode histogram
--training_algo histogram
--split_method uniform
--lr_mode uniform
--nthread 16
Expand Down Expand Up @@ -81,7 +81,7 @@ tests:
- pip install -r ../../examples/advanced/xgboost/histogram-based/temp_requirements.txt
- python3 ../../examples/advanced/xgboost/utils/prepare_job_config.py
--site_num 2
--training_mode histogram_v2
--training_algo histogram_v2
--split_method uniform
--lr_mode uniform
--nthread 16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tests:
--out_path "/tmp/nvflare/xgboost_higgs_dataset/5_uniform"
- python3 ../../examples/advanced/xgboost/utils/prepare_job_config.py
--site_num 5
--training_mode cyclic
--training_algo cyclic
--split_method uniform
--lr_mode uniform
--nthread 16
Expand Down Expand Up @@ -75,7 +75,7 @@ tests:
run_finished: true
type: run_state
setup:
- python3 ../../examples/advanced/xgboost/utils/prepare_job_config.py --site_num 5 --training_mode bagging
- python3 ../../examples/advanced/xgboost/utils/prepare_job_config.py --site_num 5 --training_algo bagging
--split_method uniform --lr_mode uniform --nthread 16 --tree_method hist
- python3 convert_to_test_job.py
--job ../../examples/advanced/xgboost/tree-based/jobs/higgs_5_bagging_uniform_split_uniform_lr
Expand Down

0 comments on commit 35830dd

Please sign in to comment.