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:
@@ -23,7 +23,7 @@ TEST(ProxyDMatrix, DeviceData) {
|
||||
proxy.SetInfo("label", labels.c_str());
|
||||
|
||||
ASSERT_EQ(proxy.Adapter().type(), typeid(std::shared_ptr<CupyAdapter>));
|
||||
ASSERT_EQ(proxy.Info().labels_.Size(), kRows);
|
||||
ASSERT_EQ(proxy.Info().labels.Size(), kRows);
|
||||
ASSERT_EQ(dmlc::get<std::shared_ptr<CupyAdapter>>(proxy.Adapter())->NumRows(),
|
||||
kRows);
|
||||
ASSERT_EQ(
|
||||
|
||||
Reference in New Issue
Block a user