diff --git a/python-package/xgboost/data.py b/python-package/xgboost/data.py index 6d27585d9ab5..8df0c3576110 100644 --- a/python-package/xgboost/data.py +++ b/python-package/xgboost/data.py @@ -811,7 +811,8 @@ def _meta_from_cudf_df(data, field: str, handle: ctypes.c_void_p) -> None: raise ValueError("Expecting meta-info to contain a single column") if field == "label" and len(data.columns) > 2: raise ValueError("Invalid shape for label.") - data = data[data.columns[0]] + if field != "label": + data = data[data.columns[0]] interface = bytes(json.dumps([data.__cuda_array_interface__], indent=2), "utf-8") _check_call(_LIB.XGDMatrixSetInfoFromInterface(handle, c_str(field), interface)) diff --git a/python-package/xgboost/sklearn.py b/python-package/xgboost/sklearn.py index 51db040e6f2c..f8f44a0ae0a0 100644 --- a/python-package/xgboost/sklearn.py +++ b/python-package/xgboost/sklearn.py @@ -1475,6 +1475,7 @@ def __init__( "Implementation of the scikit-learn API for XGBoost multi-output regression.", ['estimators', 'model', 'objective']) class XGBMultiOutputRegressor(XGBModel, XGBRegressorBase): + # pylint: disable=missing-docstring @_deprecate_positional_args def __init__( self, *, objective: _SklObjective = "reg:squarederror", **kwargs: Any