Skip to content

Commit

Permalink
reduce memory usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Mar 16, 2023
1 parent d15f363 commit 62b6f1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python-package/xgboost/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1824,8 +1824,12 @@ def _get_qid(
"`fit` method. Please remove one of them."
)
q_x = X.qid
X = X.drop("qid", axis=1)
return X, q_x
d = {}
columns = X.columns.difference(["qid"])
for c in columns:
d[c] = X.loc[:, c]
X_n = type(X)(d)
return X_n, q_x
return X, qid


Expand Down

0 comments on commit 62b6f1f

Please sign in to comment.