Write binary header. (#5532)

This commit is contained in:
Jiaming Yuan 2020-04-15 17:47:57 +08:00 committed by GitHub
parent 1b1969f20d
commit a2f54963b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -777,7 +777,8 @@ class LearnerIO : public LearnerConfiguration {
}
extra_attr.emplace_back("metrics", os.str());
}
std::string header {"binf"};
fo->Write(header.data(), 4);
fo->Write(&mparam, sizeof(LearnerModelParamLegacy));
fo->Write(tparam_.objective);
fo->Write(tparam_.booster);