xgboost/src/common/error_msg.h
2023-03-09 17:46:24 +08:00

25 lines
711 B
C++

/**
* Copyright 2023 by XGBoost contributors
*
* \brief Common error message for various checks.
*/
#ifndef XGBOOST_COMMON_ERROR_MSG_H_
#define XGBOOST_COMMON_ERROR_MSG_H_
#include "xgboost/string_view.h" // for StringView
namespace xgboost::error {
constexpr StringView GroupWeight() {
return "Size of weight must equal to the number of query groups when ranking group is used.";
}
constexpr StringView GroupSize() {
return "Invalid query group structure. The number of rows obtained from group doesn't equal to ";
}
constexpr StringView LabelScoreSize() {
return "The size of label doesn't match the size of prediction.";
}
} // namespace xgboost::error
#endif // XGBOOST_COMMON_ERROR_MSG_H_