Fix feature names and types in output model slice. (#7078)

This commit is contained in:
Jiaming Yuan
2021-07-06 11:47:49 +08:00
committed by GitHub
parent ffa66aace0
commit d7e1fa7664
2 changed files with 5 additions and 0 deletions

View File

@@ -1032,6 +1032,8 @@ class LearnerImpl : public LearnerIO {
out_impl->mparam_ = this->mparam_;
out_impl->attributes_ = this->attributes_;
out_impl->learner_model_param_ = this->learner_model_param_;
out_impl->SetFeatureNames(this->feature_names_);
out_impl->SetFeatureTypes(this->feature_types_);
out_impl->LoadConfig(config);
out_impl->Configure();
return out_impl;