Repository navigation
Fix #1052: replace pydotplus with pydot in uplift_tree_plot - #1053
Merged
Merged
Conversation
pydotplus 2.0.2 (last release 2014) raises TypeError parsing HTML-style node labels under pyparsing 3.3.3, which breaks uplift_tree_plot and four visualization tests on master CI. pydot is the maintained project pydotplus forked from and parses the same DOT string. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
jeongyoonlee
requested review from
alexander-pv,
dravesb,
huigangchen,
jpansnap,
paullo0106,
ppstacy,
ras44,
t-tte,
vincewu51 and
zhenyuz0500
October 4, 2026 03:05
ras44
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1052.
Master CI fails because pyparsing 3.3.3 (released 2026-09-20) breaks
pydotplus's parser on the HTML-style node labels (label=<... <br/> ...>) thatuplift_tree_plotwrites.pydotplus2.0.2 is its last release (2014).Change.
causalml/inference/tree/plot.pynow parses the DOT string withpydot, the maintained projectpydotpluswas forked from;pyproject.tomlswapspydotplusforpydot>=3.0.0.pydot.graph_from_dot_datareturns a list of graphs, so the function unpacks the single one. The returnedpydot.Dotkeepscreate_png()/write_png(), which is how the docs, the example notebook and the tests use it. Changelog entry under Unreleased → Bug Fixes.Verification (pyparsing 3.3.3, pydot 4.0.1):
test_uplift_tree_visualization,test_kernel_uplift_tree_visualization[False|True],test_kernel_uplift_tree_plot_multi_treatment): 4 fail with master'splot.py, 4 pass with this change.pydot3.0.0 and 2.0.0 also parse the failing label under pyparsing 3.3.3; the>=3.0.0floor keeps the range on releases that require pyparsing 3.🤖 Generated with Claude Code