-
Notifications
You must be signed in to change notification settings - Fork 133
BUG: d3viz html template is not found after installation #333
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
Comments
The d3viz functionality is not being tested or really used by the developers, so I am not surprised it is broken. Hopefully someone will be able to take a look to give feedback |
Thanks for the post! I hope so too. It seems that one only needs to make sure some template html file is copied to the d3viz directory upon installation to fix the issue. You're saying that developers don't really use this feature? But isn't the graph visualization quite useful? I think it is a really cool feature, distinguishing it from other computational graph frameworks that is worth maintaining! |
Yeah, I think it could be useful, I just haven't seen much use (or any at all) since we forked from Theano/Aesara. Other libraries usually rely on a condensed type of graph, for instance just showing relationship between named nodes, such as this utility in PyMC: Some example outputs in: For pure PyTensor graphs I usually just use Anyway, in the codebase, it seems we have just these tests: https://github.com/pymc-devs/pytensor/blob/main/tests/d3viz/test_d3viz.py However it doesn't seem the dependency is being installed according to the CI logs: https://github.com/pymc-devs/pytensor/actions/runs/5212573519/jobs/9406421099#step:6:1730 Even though we request it be installed: pytensor/.github/workflows/test.yml Line 142 in ec6a315
So a first step, would be to try and run those tests locally and see if they pass or are broken. |
I think this is a setuptools issue. One probably needs to add the correct files to |
[Deleted wrong comment] |
You mean the specific For the tests it seems we actually have to install Lines 54 to 61 in ec6a315
However I am not sure this package is still maintaned? Last release was February 2021: https://pypi.org/project/pydot/#history |
Ah, I meant the original issue, not the CI tests |
Okay, so we should fix the setup to handle those path issues correctly and decide whether we want to test pydot/graphviz support or not. If not, I guess there's no other reason to install graphviz either |
The |
Thanks everyone for trying to solve the problem! |
Sure thanks for the feedback.
But I agree it's a different use case. Would you have availability to update the docs regarding the Also @maresb do you have more specific recommendations for what the fix could look like? |
I committed a pull request to fix the |
It seems this file used to exist in Theano, and no longer exists in PyTensor: https://github.com/Theano/Theano/blob/master/theano/d3viz/html/template.html |
It was lost in the rename to PyTensor: 19e1a98#diff-976e71f8933be25c4bd13d49f8ebf4c8b9f524585a85b1303409ffc44182d577 |
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue:
I followed the example described here: https://pytensor.readthedocs.io/en/latest/library/d3viz/index.html
I did not change any line of the example code provided and everything executes fine (including the installation of
pydot-ng
) until the lined3v.d3viz(predict, 'examples/mlp.html')
, where an error is thrown, even though the import statementimport pytensor.d3viz as d3v
returns no error.The error is:
No such file or directory: '<HOME>/.local/lib/python3.11/site-packages/pytensor/d3viz/html/template.html'
. When checking the directory, I can see that the directory'<HOME>/.local/lib/python3.11/site-packages/pytensor/d3viz/
actually does exist but there is no/html/
folder inside.I also made sure that
graphviz
is installed on the system.What to do about this? Thanks!
Reproducable code example:
Error message:
PyTensor version information:
Pytensor Version 2.12.1, installed with pip
Python Version 3.11.3
Linux
Context for the issue:
The graph visualization feature would be very important for my work.
The text was updated successfully, but these errors were encountered: