-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support column split in multi-target hist
#9171
Changes from 20 commits
7256ed6
e859a34
5f28337
031430e
12d880f
4990f4f
d56c4db
d95adb2
d05a64c
b55a39c
8f284e6
67de445
4a92cd0
f2155cb
b9d3a92
d9632e6
ca25170
e67f4cb
19de3a1
12c7611
3dd7632
a7169b4
a388b45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -698,6 +698,9 @@ void MetaInfo::Extend(MetaInfo const& that, bool accumulate_rows, bool check_col | |
this->feature_type_names = that.feature_type_names; | ||
auto &h_feature_types = feature_types.HostVector(); | ||
LoadFeatureType(this->feature_type_names, &h_feature_types); | ||
} else if (!that.feature_types.Empty()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rongou Could you please help comment on when the meta info has feature types but doesn't have type names? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think in some tests we set the feature types directly without setting the type names. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it, let me try to run the tests. |
||
this->feature_types.Resize(that.feature_types.Size()); | ||
this->feature_types.Copy(that.feature_types); | ||
} | ||
if (!that.feature_weights.Empty()) { | ||
this->feature_weights.Resize(that.feature_weights.Size()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trivialfis I think this is a legit bug. If
categories
is empty,std::max_element
returnscategories.cend
, which leads to undefined behavior when accessed.Presumably with row-split
categories
would never be empty, but with column-split it's pretty common.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great if you can leave a comment there so that others don't accidentally remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.