Send default configuration from metric to objective. (#8760)
This commit is contained in:
@@ -134,6 +134,12 @@ class AFTObj : public ObjFunction {
|
||||
void LoadConfig(Json const& in) override {
|
||||
FromJson(in["aft_loss_param"], ¶m_);
|
||||
}
|
||||
Json DefaultMetricConfig() const override {
|
||||
Json config{Object{}};
|
||||
config["name"] = String{this->DefaultEvalMetric()};
|
||||
config["aft_loss_param"] = ToJson(param_);
|
||||
return config;
|
||||
}
|
||||
|
||||
private:
|
||||
AFTParam param_;
|
||||
|
||||
Reference in New Issue
Block a user