Skip to content

Commit 582540e

Browse files
authored
don't append threshold twice (#464)
Signed-off-by: Jan-Benedikt Jagusch <[email protected]>
1 parent 680de9c commit 582540e

File tree

1 file changed

+2
-1
lines changed
  • onnxmltools/convert/lightgbm/operator_converters

1 file changed

+2
-1
lines changed

onnxmltools/convert/lightgbm/operator_converters/LightGbm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def _parse_tree_structure(tree_id, class_id, learning_rate,
9696
text = text[:100000] + "\n..."
9797
raise TypeError("threshold must be a number not '{}'"
9898
"\n{}".format(tree_structure['threshold'], text))
99-
attrs['nodes_values'].append(tree_structure['threshold'])
99+
else:
100+
attrs['nodes_values'].append(tree_structure['threshold'])
100101

101102
# Assume left is the true branch and right is the false branch
102103
attrs['nodes_truenodeids'].append(left_id)

0 commit comments

Comments
 (0)