Skip to content

Commit

Permalink
[pyspark] Don't stack for non feature columns (#9088)
Browse files Browse the repository at this point in the history
  • Loading branch information
wbo4958 authored Apr 25, 2023
1 parent a2cc78c commit 17add47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python-package/xgboost/spark/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ def append_m(part: pd.DataFrame, name: str, is_valid: bool) -> None:
array: Optional[np.ndarray] = part[feature_cols]
elif part[name].shape[0] > 0:
array = part[name]
array = stack_series(array)
if name == alias.data:
# For the array/vector typed case.
array = stack_series(array)
else:
array = None

Expand Down

0 comments on commit 17add47

Please sign in to comment.