Open vischia opened 4 months ago
doesn't look like @szagoruyko has been activate on twitter / github for years now. have to fork this repo.
working fork https://github.com/leo-ware/pytorchviz
I also made the pull request. May put the working version on pip if it doesn't get merged.
that depedencies I believe is looking for pytorch 1. so it's a bit ancient. can comment this code out. i did start making the charts more beautiful - with google material theme. You can paste in the svg into chatgpt and just ask it to reformat the styles. would make a massive difference to this library. https://github.com/szagoruyko/pytorchviz/issues/84
the only other thing i see in a lot of papers is the positional embedding - funny circle thing - if svg could somehow spit this out - i think it add something too. pretty much the only reason people are using adobe illustrator for these things.
@johndpope if the original maintainers don't approve the pull request, would you be interested in publishing a fork? Could create a torchviz2 with the new styling and python 3.12 compatibility.
if there's interest here - would serve community - happy to help - or happy to support a version published by yourself.
When I throw this code / sample into claude.ai opus - it says use pytorch library hiddenlayer instead to get a more undertandable graph.
(meaning the make_dot adds so much complexity)
my goal in pickingup this libary was to pull apart the attention models to get better intuition. looking at the EMSA - it's a pretty but perhaps needlessly complicated. maybe we can cherry pick the stuff to turn off the internal pytorch operations to simplify chart...
https://github.com/waleedka/hiddenlayer/blob/master/demos/pytorch_graph.ipynb
I'm emailing the original author. Hopefully, he'll be happy to merge stuff. I'm currently working on another open-source library where I was hoping to add pytorchviz as a dependency, and I'd rather not be vendoring it just to get 3.12 support.
Definitely excited to see how we could extend this package.
@leo-ware
Is there any reply yet?
I think there is a big need to continue this torchviz tool and probably move to the orgs repo rather than the individual repo. I see a lot of people, including myself, used it and will continue to use it. Also, some valuable PRs are not merged nor any comment given there.
Also cc @albanD @Varal7
Thanks for the cc, looking into the best way forward here.
Hello,
it seems that distutils has been removed from python, in favour of setuptools.
When running in python3.12, importing torchviz fails (see error message below [1]) because
dot.py
still explicitly imports distutils: it would be good to fix this dependency, otherwise people will have to drop torchviz from their workflows.Thank you very much in advance!
Cheers, Pietro
[1]