Skip to content

Commit

Permalink
Fix sklearn tests (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
krfricke authored Apr 24, 2023
1 parent 648d6dd commit 02a1cb3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions xgboost_ray/tests/test_sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,10 +976,8 @@ def test_constraint_parameters(self):
reg.fit(X, y)

config = json.loads(reg.get_booster().save_config())
if XGBOOST_VERSION > Version("1.7.4"):
assert (config["learner"]["gradient_booster"]["tree_train_param"][
"interaction_constraints"] == "[[0, 1], [2, 3, 4]]")
elif XGBOOST_VERSION >= Version("1.6.0"):

if XGBOOST_VERSION >= Version("1.6.0"):
assert (config["learner"]["gradient_booster"]["updater"][
"grow_histmaker"]["train_param"]["interaction_constraints"] ==
"[[0, 1], [2, 3, 4]]")
Expand Down

0 comments on commit 02a1cb3

Please sign in to comment.