Fix issue #1236: cli_main crashes when dumping count:poisson model (#1253)

This commit is contained in:
Shengwen Yang 2016-06-08 12:52:47 +08:00 committed by Tianqi Chen
parent e2c1aa8b51
commit e034fdf74c
2 changed files with 2 additions and 1 deletions

@ -1 +1 @@
Subproject commit 1db0792e1a55355b1f07699bba18c88ded996953
Subproject commit 9fd3b48462a7a651e12a197679f71e043dcb25a2

View File

@ -271,6 +271,7 @@ void CLIDump2Text(const CLIParam& param) {
std::unique_ptr<Learner> learner(Learner::Create({}));
std::unique_ptr<dmlc::Stream> fi(
dmlc::Stream::Create(param.model_in.c_str(), "r"));
learner->Configure(param.cfg);
learner->Load(fi.get());
// dump data
std::vector<std::string> dump = learner->Dump2Text(fmap, param.dump_stats);