Skip to content

Commit

Permalink
don't append threshold twice (#464)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Benedikt Jagusch <jan.jagusch@gmail.com>
  • Loading branch information
janjagusch committed Jun 18, 2021
1 parent 680de9c commit 582540e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion onnxmltools/convert/lightgbm/operator_converters/LightGbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def _parse_tree_structure(tree_id, class_id, learning_rate,
text = text[:100000] + "\n..."
raise TypeError("threshold must be a number not '{}'"
"\n{}".format(tree_structure['threshold'], text))
attrs['nodes_values'].append(tree_structure['threshold'])
else:
attrs['nodes_values'].append(tree_structure['threshold'])

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

0 comments on commit 582540e

Please sign in to comment.