Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 10abeee

Browse files
authored
Fix cutting edge CI (#185)
XGBoost 1.6.0 takes longer to train
1 parent b37179a commit 10abeee

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

.github/workflows/test.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
3131
test_linux_ray_master:
3232
runs-on: ubuntu-latest
33-
timeout-minutes: 100
33+
timeout-minutes: 120
3434
strategy:
3535
matrix:
3636
python-version: [3.6.9, 3.7, 3.8]
@@ -62,7 +62,7 @@ jobs:
6262
- name: Run tests
6363
uses: nick-invision/retry@v2
6464
with:
65-
timeout_minutes: 30
65+
timeout_minutes: 35
6666
max_attempts: 3
6767
command: bash ./run_ci_tests.sh
6868
- name: Run examples
@@ -74,7 +74,7 @@ jobs:
7474

7575
test_linux_ray_release:
7676
runs-on: ubuntu-latest
77-
timeout-minutes: 100
77+
timeout-minutes: 120
7878
strategy:
7979
matrix:
8080
python-version: [3.6.9, 3.7, 3.8]
@@ -99,7 +99,7 @@ jobs:
9999
- name: Run tests
100100
uses: nick-invision/retry@v2
101101
with:
102-
timeout_minutes: 30
102+
timeout_minutes: 35
103103
max_attempts: 3
104104
command: bash ./run_ci_tests.sh
105105
- name: Run examples
@@ -113,7 +113,7 @@ jobs:
113113
# Test compatibility when some optional libraries are missing
114114
# Test runs on latest ray release
115115
runs-on: ubuntu-latest
116-
timeout-minutes: 100
116+
timeout-minutes: 120
117117
strategy:
118118
matrix:
119119
python-version: [3.6.9, 3.7, 3.8]
@@ -143,7 +143,7 @@ jobs:
143143
- name: Run tests
144144
uses: nick-invision/retry@v2
145145
with:
146-
timeout_minutes: 30
146+
timeout_minutes: 35
147147
max_attempts: 3
148148
command: bash ./run_ci_tests.sh --no-tune
149149
- name: Run examples
@@ -156,7 +156,7 @@ jobs:
156156
test_linux_cutting_edge:
157157
# Tests on cutting edge, i.e. latest Ray master, latest XGBoost master
158158
runs-on: ubuntu-latest
159-
timeout-minutes: 100
159+
timeout-minutes: 120
160160
strategy:
161161
matrix:
162162
python-version: [3.6.9, 3.7, 3.8]
@@ -205,7 +205,7 @@ jobs:
205205
- name: Run tests
206206
uses: nick-invision/retry@v2
207207
with:
208-
timeout_minutes: 30
208+
timeout_minutes: 35
209209
max_attempts: 3
210210
command: bash ./run_ci_tests.sh
211211
- name: Run examples
@@ -218,7 +218,7 @@ jobs:
218218
test_linux_xgboost_legacy:
219219
# Tests on XGBoost 0.90 and latest Ray release
220220
runs-on: ubuntu-latest
221-
timeout-minutes: 100
221+
timeout-minutes: 120
222222
strategy:
223223
matrix:
224224
python-version: [3.6.9]
@@ -246,7 +246,7 @@ jobs:
246246
- name: Run tests
247247
uses: nick-invision/retry@v2
248248
with:
249-
timeout_minutes: 30
249+
timeout_minutes: 35
250250
max_attempts: 3
251251
command: bash ./run_ci_tests.sh
252252
- name: Run examples

xgboost_ray/tests/test_sklearn.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,10 @@ def test_parameter_tuning(self):
387387
)
388388
clf.fit(X, y)
389389
assert clf.best_score_ < 0.7
390-
assert clf.best_params_ == {"n_estimators": 100, "max_depth": 4}
390+
if XGBOOST_VERSION_TUPLE >= (1, 6, 0):
391+
assert clf.best_params_ == {"n_estimators": 200, "max_depth": 2}
392+
else:
393+
assert clf.best_params_ == {"n_estimators": 100, "max_depth": 4}
391394

392395
def test_regression_with_custom_objective(self):
393396
self._init_ray()
@@ -960,8 +963,14 @@ def test_constraint_parameters(self):
960963
reg.fit(X, y)
961964

962965
config = json.loads(reg.get_booster().save_config())
963-
assert (config["learner"]["gradient_booster"]["updater"]["prune"][
964-
"train_param"]["interaction_constraints"] == "[[0, 1], [2, 3, 4]]")
966+
if XGBOOST_VERSION_TUPLE >= (1, 6, 0):
967+
assert (config["learner"]["gradient_booster"]["updater"][
968+
"grow_histmaker"]["train_param"]["interaction_constraints"] ==
969+
"[[0, 1], [2, 3, 4]]")
970+
else:
971+
assert (config["learner"]["gradient_booster"]["updater"]["prune"][
972+
"train_param"]["interaction_constraints"] ==
973+
"[[0, 1], [2, 3, 4]]")
965974

966975
# TODO check why this is not working (output is empty, probably due to Ray)
967976
# def test_parameter_validation(self):

0 commit comments

Comments
 (0)