RustQuant icon indicating copy to clipboard operation
RustQuant copied to clipboard

`autodiff`: improve the Graphviz visualisations.

Open avhz opened this issue 2 years ago • 4 comments

There are problems with the Graphviz plotting of the computation graphs in autodiff:

  • [ ] The nodes don't indicate the operation that took place (e.g. +, sin).
  • [ ] There are double links from one node to others (e.g. input x1 has two edges to Op_3).
    • The edge should not be drawn if the weight is 0.

graphviz

avhz avatar Jul 15 '23 21:07 avhz

Hello! Along my path to start learning Rust I've come across your repository and I'd like to tackle this issue if it's not out of the scope of my current skills.

May I ask for a hint? Where could I get the operation performed on the input? I haven't found it available either in the Variable nor in the Graph. Thank you

nicola-corbellini avatar Sep 03 '23 19:09 nicola-corbellini

Hi thanks for the interest! Unfortunately there's no current way to retrieve the operation performed, and this would need to be added.

avhz avatar Sep 04 '23 09:09 avhz

Created Pull request #131 to address this.

JainVidit12 avatar Sep 21 '23 23:09 JainVidit12

Might i recommend the plotters library as well? We have used it quite a bit and found it to be really good.

0xJepsen avatar Dec 16 '23 20:12 0xJepsen