Make sure metrics work with federated learning (#9037)
This commit is contained in:
@@ -189,7 +189,9 @@ double GetMultiMetricEval(xgboost::Metric* metric,
|
||||
info.weights_.HostVector() = weights;
|
||||
info.group_ptr_ = groups;
|
||||
info.data_split_mode = data_split_mode;
|
||||
|
||||
if (info.IsVerticalFederated() && xgboost::collective::GetRank() != 0) {
|
||||
info.labels.Reshape(0);
|
||||
}
|
||||
return metric->Evaluate(preds, p_fmat);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user