From d553e7cb03a34a574437196fd17335f731a30d25 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Tue, 28 Feb 2023 21:44:50 +0800 Subject: [PATCH] Use old objective. --- tests/python/test_eval_metrics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/python/test_eval_metrics.py b/tests/python/test_eval_metrics.py index 5b4e5751c319..7a243edb9f52 100644 --- a/tests/python/test_eval_metrics.py +++ b/tests/python/test_eval_metrics.py @@ -299,7 +299,9 @@ def test_pr_auc_multi(self): def run_pr_auc_ltr(self, tree_method): from sklearn.datasets import make_classification X, y = make_classification(128, 4, n_classes=2, random_state=1994) - ltr = xgb.XGBRanker(tree_method=tree_method, n_estimators=16) + ltr = xgb.XGBRanker( + tree_method=tree_method, n_estimators=16, objective="rank:pairwise" + ) groups = np.array([32, 32, 64]) ltr.fit( X,