From f1f69ff10e96b2c4c6c5837dc201081c974572a0 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Tue, 14 May 2024 12:13:35 +0800 Subject: [PATCH] [CI] Fixes for using the latest modin. (#10285) --- tests/python/test_with_modin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/python/test_with_modin.py b/tests/python/test_with_modin.py index ce0dbd609..875c5f7f1 100644 --- a/tests/python/test_with_modin.py +++ b/tests/python/test_with_modin.py @@ -1,4 +1,5 @@ import numpy as np +import pandas as pd import pytest import xgboost as xgb @@ -71,7 +72,11 @@ class TestModin: np.testing.assert_array_equal(result.columns, exp) dm = xgb.DMatrix(dummies) assert dm.feature_names == ['B', 'A_X', 'A_Y', 'A_Z'] - assert dm.feature_types == ['int', 'int', 'int', 'int'] + if int(pd.__version__[0]) >= 2: + assert dm.feature_types == ["int", "i", "i", "i"] + else: + assert dm.feature_types == ["int", "int", "int", "int"] + assert dm.num_row() == 3 assert dm.num_col() == 4