It’s already the end of GSoC2015! I used the remaining two weeks to wrap up my project. Specifically,
- I made some further layout improvements and fixed remaining bugs,
- I tested the visualizing in different browsers and wrote test cases,
- I made sure that all interfaces are documented, and
- I wrote a user guide.
Finally, I submitted a pull request, which will hopefully be merged soon into Theano’s master branch! Then it will be your job to test the new d3viz module for interactive visualizing of Theano graphs, and to let me know about issues and features requests!
Theano OpFromGraph ops allow to define new operations that can be called with different inputs at different places in the compute graph. I extended my implementation to compactly visualize OpFromGraph ops: By default, an OpFromGraph op is represented as a single node. Clicking on it will reveal its internal graph structure. Have a look at this example!
OpFromGraph ops may be composed of further OpFromGraph nodes, which will be visualized as nested graphs as you can see in this example.
In the last stage of GSoC 2015, I will improve how nodes are arranged in the visualization, shorten node labels, and show more detailed information about nodes such as their definition in the source code!
Theano allows function profiling by setting the
profile=True flag. After at least one function call, the compute time of each node can be then be printed with
debugprint. However, analyzing complex graphs in this way can become cumbersome.
d3printing allows now to graphically visualize the same timing information and hence to easily spot bottlenecks in Theano graphs! If the function has been profiled, a ‘Toggle profile colors’ button will appear on the top on the page. By clicking on it, nodes will be colored by their compute time. In addition, timing information can be retrieved by mouse-over event! You can find an example here, and the source code here.
The second new feature is a context menu to edit the label of nodes and to release them from a fixed position.
The next release will make it possible to visualize complicated nested graphs with OpFromGraph nodes. Stay tuned!
Theano graphs become editable! By clicking on nodes, it is now possible to change their label. This allows to shorten default labels or to extend them by additional information. Moving the cursor over nodes will now also highlight all incoming and outgoing edges . You can find three examples here.
I started to work on curved edges that minimize intersections with nodes, but everything is still in development:
Apart from that, I fixed a couple of bugs and revised the backend to visualizing more detailed graph information in the future, such as timing information or nested graphs.
I welcome any feedback and ideas to further improve the visualization!
Further steps towards a more agile visualization…
Last week, I revised my implementation to improve the visualization of complex graphs with many nodes. Specifically, I
- added buttons to rearrange all nodes in a force layout,
- implemented double-click events to release single nodes from a fixed position,
- colored edges consistently with pydotprint.
You can play around with three different examples here!
Theano is becoming more colourful! Last week, I
- improved the graph layout
- revised colors and shapes of nodes
- improved the visualization of edges and mouseover events
- scaled the visualization to the full page size
You can find two examples here!
into a dynamic graph:
Nodes are arranged in a force layout, and it is possible to pan and zoom, to drag and drop nodes, and to highlight edge information via mouse-over events.
The visualization is far from perfect! Next week, I will
- revise the layout to arrange nodes,
- use the same colors and shapes for nodes as pydotprint,
- revise the visualization of edges,
- improve mouse-over events, and
- use the full page width and height to visualize the graph.
I am very proud to announce that my Google Summer of Code (GSoC) proposal ‘Theano: Interactive visualization of Computational Graphs’ was successful, which gives me the chance to enhance Theano’s visualization features this summer!
GSoC2015 will take place between 25 May and 31 August, and will contain a mid-term and end-term evaluation. I will be mentored by Frédéric Bastien, and regularly post about my progress.
Looking forward to a great Summer!