This repository was archived by the owner on Jan 12, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -159,10 +159,9 @@ jobs:
159159 timeout-minutes : 160
160160 strategy :
161161 matrix :
162- python-version : [3.6.9, 3.7, 3.8]
162+ # no new versions for xgboost are published for 3.6
163+ python-version : [3.7, 3.8]
163164 include :
164- - python-version : 3.6.9
165- ray-wheel : https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-2.0.0.dev0-cp36-cp36m-manylinux2014_x86_64.whl
166165 - python-version : 3.7
167166 ray-wheel : https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-2.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
168167 - python-version : 3.8
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ def inner_f(*args, **kwargs):
5959 return inner_f
6060
6161
62+ # If _wrap_evaluation_matrices has new arguments added in xgboost, update
63+ # RayXGBMixin._ray_get_wrap_evaluation_matrices_compat_kwargs
6264try :
6365 from xgboost .sklearn import _wrap_evaluation_matrices
6466except ImportError :
@@ -358,13 +360,20 @@ def _ray_predict(
358360 def _ray_get_wrap_evaluation_matrices_compat_kwargs (
359361 self , label_transform = None ) -> dict :
360362 ret = {}
361- if "label_transform" in inspect .signature (
362- _wrap_evaluation_matrices ).parameters :
363+ wrap_evaluation_matrices_parameters = inspect .signature (
364+ _wrap_evaluation_matrices ).parameters
365+ if "label_transform" in wrap_evaluation_matrices_parameters :
363366 # XGBoost < 1.6.0
364367 identity_func = lambda x : x # noqa
365368 ret ["label_transform" ] = label_transform or identity_func
366- if hasattr (self , "enable_categorical" ):
369+ if hasattr (
370+ self , "enable_categorical"
371+ ) and "enable_categorical" in wrap_evaluation_matrices_parameters :
367372 ret ["enable_categorical" ] = self .enable_categorical
373+ if hasattr (
374+ self , "feature_types"
375+ ) and "feature_types" in wrap_evaluation_matrices_parameters :
376+ ret ["feature_types" ] = self .feature_types
368377 return ret
369378
370379 # copied from the file in the top comment
You can’t perform that action at this time.
0 commit comments