Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
72f2349a
Commit
72f2349a
authored
Dec 25, 2017
by
Guolin Ke
Browse files
fix #1142 (feature name with `=` symbol).
parent
87d4ce09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/boosting/gbdt_model_text.cpp
src/boosting/gbdt_model_text.cpp
+5
-1
No files found.
src/boosting/gbdt_model_text.cpp
View file @
72f2349a
...
...
@@ -334,7 +334,11 @@ bool GBDT::LoadModelFromString(const char* buffer, size_t len) {
key_vals
[
strs
[
0
]]
=
strs
[
1
];
}
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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment