Commit 72f2349a authored by Guolin Ke's avatar Guolin Ke
Browse files

fix #1142 (feature name with `=` symbol).

parent 87d4ce09
...@@ -334,7 +334,11 @@ bool GBDT::LoadModelFromString(const char* buffer, size_t len) { ...@@ -334,7 +334,11 @@ bool GBDT::LoadModelFromString(const char* buffer, size_t len) {
key_vals[strs[0]] = strs[1]; key_vals[strs[0]] = strs[1];
} }
else if (strs.size() > 2) { else if (strs.size() > 2) {
Log::Fatal("Wrong line at model file: %s", cur_line.c_str()); if (strs[0] == "feature_name") {
key_vals[strs[0]] = cur_line.substr(std::strlen("feature_names=")).c_str();
} else {
Log::Fatal("Wrong line at model file: %s", cur_line.substr(0, 128).c_str());
}
} }
} }
else { else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment