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
0a4851f5
Unverified
Commit
0a4851f5
authored
Apr 13, 2022
by
shiyu1994
Committed by
GitHub
Apr 13, 2022
Browse files
check nullable of bin_mappers in DatasetLoader::CheckCategoricalFeatureNumBin (fix #5145) (#5146)
parent
9a964fef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/io/dataset_loader.cpp
src/io/dataset_loader.cpp
+1
-1
No files found.
src/io/dataset_loader.cpp
View file @
0a4851f5
...
...
@@ -1485,7 +1485,7 @@ void DatasetLoader::CheckCategoricalFeatureNumBin(
for
(
size_t
i
=
start
;
i
<
end
;
++
i
)
{
thread_need_warning
[
thread_index
]
=
false
;
const
int
max_bin_for_this_feature
=
max_bin_by_feature
.
empty
()
?
max_bin
:
max_bin_by_feature
[
i
];
if
(
bin_mappers
[
i
]
->
bin_type
()
==
BinType
::
CategoricalBin
&&
bin_mappers
[
i
]
->
num_bin
()
>
max_bin_for_this_feature
)
{
if
(
bin_mappers
[
i
]
!=
nullptr
&&
bin_mappers
[
i
]
->
bin_type
()
==
BinType
::
CategoricalBin
&&
bin_mappers
[
i
]
->
num_bin
()
>
max_bin_for_this_feature
)
{
thread_need_warning
[
thread_index
]
=
true
;
break
;
}
...
...
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