Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Oct 15, 2021
1 parent 469857a commit 994d9bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python-package/xgboost/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions python-package/xgboost/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 994d9bc

Please sign in to comment.