-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix gflow visualization #107
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@d1ssk looks good! please see my changes and if you are happy about them, please squash and merge.
@d1ssk if you have time - can you add type hints to visualization.py? I think it's time to start adding them part by part.. |
It seems that python<=3.8 and python>=3.9 have different ways of adding type hints. (Either include the typing module or use the built-in type hints class). Currently, graphix requirements are >=3.8,<3.12, so we need to decide which one we should use and make it consistent across the library. This time, I'm merging this PR without adding them. |
Ahn okay. glad to be of help ;). But can you maybe hint me at the problem ? So that I can bypass it somehow for my own tasks for a while before you fix it in the mentioned PR. |
Sure. The problem had lain in the section where the edges to be drawn are collected, lines 547 and 548 of |
Before submitting, please check the following:
tox
)black -l 120 <filename>
Then, please fill in below:
Context (if applicable):
Singular matrix error occured with visualisation tool when drawing graph with gflow. (#97 )
Description of the change:
The direct cause of the error was in the
get_figsize()
method, which returned 0 height for pattern without input_nodes. Fixed that part and modified some detailed drawing methods for better gflow visualization.Related issue:
#97
also see that checks (github actions) pass.
If lint check keeps failing, try installing black==22.8.0 as behavior seems to vary across versions.