Fix dump model. (#5485)

This commit is contained in:
Jiaming Yuan
2020-04-05 03:52:54 +08:00
committed by GitHub
parent 5fc5ec539d
commit a9313802ea
3 changed files with 3 additions and 5 deletions

View File

@@ -897,9 +897,8 @@ class LearnerImpl : public LearnerIO {
std::vector<std::string> DumpModel(const FeatureMap& fmap,
bool with_stats,
std::string format) const override {
CHECK(!this->need_configuration_)
<< "The model hasn't been built yet. Are you using raw Booster interface?";
std::string format) override {
this->Configure();
return gbm_->DumpModel(fmap, with_stats, format);
}