Fix training continuation with categorical model. (#7810)
* Make sure the task is initialized before construction of tree updater. This is a quick fix meant to be backported to 1.6, for a full fix we should pass the model param into tree updater by reference instead.
This commit is contained in:
parent
2d83b2ad8f
commit
5dea21273a
@ -419,6 +419,7 @@ class LearnerConfiguration : public Learner {
|
|||||||
obj_.reset(ObjFunction::Create(tparam_.objective, &generic_parameters_));
|
obj_.reset(ObjFunction::Create(tparam_.objective, &generic_parameters_));
|
||||||
}
|
}
|
||||||
obj_->LoadConfig(objective_fn);
|
obj_->LoadConfig(objective_fn);
|
||||||
|
learner_model_param_.task = obj_->Task();
|
||||||
|
|
||||||
tparam_.booster = get<String>(gradient_booster["name"]);
|
tparam_.booster = get<String>(gradient_booster["name"]);
|
||||||
if (!gbm_) {
|
if (!gbm_) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user