Convert labels into tensor. (#7456)
* Add a new ctor to tensor for `initilizer_list`. * Change labels from host device vector to tensor. * Rename the field from `labels_` to `labels` since it's a public member.
This commit is contained in:
@@ -148,7 +148,8 @@ class TestPandas:
|
||||
assert not np.any(arr == -1.0)
|
||||
|
||||
X = X["f0"]
|
||||
with pytest.raises(ValueError):
|
||||
y = y[:X.shape[0]]
|
||||
with pytest.raises(ValueError, match=r".*enable_categorical.*"):
|
||||
xgb.DMatrix(X, y)
|
||||
|
||||
Xy = xgb.DMatrix(X, y, enable_categorical=True)
|
||||
|
||||
Reference in New Issue
Block a user