Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dataflow Visualization using ASCII DAG

Dataflow Visualization using ASCII DAG

「iMLSE 2018」で発表された資料です。

gree_tech

April 22, 2019
Tweet

More Decks by gree_tech

Other Decks in Technology

Transcript

  1. Outline • Why we visualize DAG? • Background and Motivation

    • Left Aligned ASCII DAG(Proposed Visualization) • Result and Future Works 2
  2. Outline • Why we visualize DAG? • Background and Motivation

    • Left Aligned ASCII DAG(Proposed Visualization) • Result and Future Works 3
  3. DAG(Directed Acyclic Graph)? • What is DAG? ◦ Directed graph.

    ◦ No loop. • Why we visualize DAG? ◦ Tensorflow’s computation graph == DAG ◦ DAG is a machine learning core. ◦ Have to review and debug DAG. ◦ DAG is too long for reviewing it today. 4
  4. Outline • Why we visualize DAG? • Background and Motivation

    ◦ Development Flow ◦ Long Dataflow • Left Aligned ASCII DAG(Proposed Visualization) • Result and Future Work 5
  5. Agile: Development Flow 1. Check Requirement 2. Design the codes

    for the requirement. 3. Build and Test the codes 4. Review a. Confirm the requirement. b. Compare the changes of the code. c. If it is OK, go to deployment. 5. Deploy a. Merge the code b. Apply the code for a production. 6 Req. Design Build Deploy Test 1 or 2 Weeks Repeat small tasks.
  6. Review: github flow known as Pull Request 9 We want

    to review the changes of both the code and the dataflow on this UI. Tensorboard can not show the changes of the dataflow.
  7. Complex and Long Dataflow 11 AlexNet GoogLeNet Inception-V3 Inception-V4 These

    data from ICLR 2017:AN ANALYSIS OF DEEP NEURAL NETWORK MODELS FOR PRACTICAL APPLICATIONS VGG is here.
  8. Outline • Why we visualize DAG? • Background and Motivation

    • Left Aligned ASCII DAG(Proposed Visualization) ◦ Project Goal ◦ Developed Visualization Tool • Result and Future Work 12
  9. Project Goal • Make visualization-tool for DAG. • The tool

    is available in current development flow. ◦ Github flow : Pull Request. • Compare the changes of DAG easily. • Scalability of showing large dataflow. 13
  10. Left Aligned DAG(Proposed Visualization) • Feature ◦ Use ASCII ◦

    Left Aligned ◦ Compact 14 Proposed Visualization Graphviz(Conventional Visualization)
  11. Performance for large DAG: Inception-V3 16 Graphviz : 44 sec

    Proposed method: 14sec It looks nice?
  12. Result And Future Works • Make visualization-tool for DAG using

    ASCII. ◦ Registered in PyPi. ◦ https://pypi.org/project/stackeddag/ • Work with Pull Request together. • Can show a large graph of dataflow. • Using this on actual product/development flow is a future work. 17
  13. Rendering Algorithm 1. Get depth of nodes 2. Gen reversed

    DAG and Get reversed depth of nodes. 3. Order nodes by the depth. 4. If the depth is the same, order nodes by the reversed depth. 5. If the reversed depth is the same, order nodes by the label of nodes 6. Connect nodes by using ascii text. 20
  14. Related Work for visualization of DAG 30 • Use Image

    ◦ Tensorboard ◦ tfGraphviz using graphviz • Use Ascii ◦ graph-easy ◦ git ◦ graphterm ◦ leaf These do not focus on the changes of codes.
  15. Tensorboard 31 • Pros ◦ Sophisticated UI • Cons ◦

    Can not compare a difference of graphs. ◦ Use wide space
  16. tfGraphviz == graphviz 32 • Pros ◦ Sophisticated visualization •

    Cons ◦ Can not compare a difference of graphs.
  17. Limit of using image. 33 • If we use image

    for graph, • We have to compare the difference side by side.
  18. graph-easy 34 • Pros ◦ We can compare the difference

    by diff-command. • Cons ◦ Use wide space
  19. graphterm 36 • Pros ◦ We can compare the difference

    by diff-command. • Cons ◦ Not design with diff-command.
  20. graphterm 37 • Pros ◦ We can compare the difference

    by diff-command. • Cons ◦ Not design with diff-command. o new node
  21. leaf 38 • Pros ◦ We can compare the difference

    by diff-command. • Cons ◦ Not design with diff-command.
  22. Project Goal • Make visualization-tool for DAG. • The tool

    is available in current development flow. ◦ Github flow : Pull Request. • Compare the changes of DAG easily. • Scalability of showing large dataflow. 39 If the visualization is ASCII, we can solve the problems of both flow and changes.
  23. Background • Complex and Long Dataflow • Want to use

    a visualization tool on today’s development flow. ◦ We need a visualization tool for the dataflow. • How to visualize Dataflow(As Conventional Method) • Requirement of what we improve ◦ reviewable ◦ compact ◦ fast • Conventional Method 41
  24. Outline • What is a problem? • Agile Development Flow

    • Why we focus on a visualization of DAG? Why we use ASCII? • Compare with other visualization. • Left Aligned ASCII DAG • About rendering algorithm • Evaluation by using Google Inception V3 • Results and Future works 43
  25. Compex and Long Dataflow 45 AlexNet GoogLeNet Inception-V3 Inception-V4 These

    data from ICLR 2017:AN ANALYSIS OF DEEP NEURAL NETWORK MODELS FOR PRACTICAL APPLICATIONS VGG is here.
  26. Development Flow (Agile) 46 Requirements Waterfall Design Build Test Release

    Agile 1 Year Req. Design Build Deploy Test Req. Design Build Deploy Test Req. Design Build Deploy Test 1 or 2 Weeks
  27. Agile • Split large task into small tasks. • One

    task takes short term. • Pros ◦ Keep the systems available ◦ Can catch up the requirement quickly, when requirements are changed. • Cons ◦ Goal is not so clear. ▪ Almost OSS like HTTP server do not have clear goal. 47
  28. Practical Development flow for agile 1. Check a issue(== Requirement)

    2. Design and make the codes for the issue 3. Build and Test with CI 4. Review a. Confirm the issue b. Compare the difference of the code. c. If it is OK, go to deployment. 5. Deploy a. Merge the code b. Apply the code for a production. 48 Req. Design Build Deploy Test 1 or 2 Weeks
  29. Review: github flow known as Pull Request 51 We want

    to review the code and the dataflow.
  30. Requirement for our development flow • Review the dataflow and

    the code by PullRequest-View/Tool. • Compare the difference of the dataflow • If the parts of dataflow are not changed, Do not show any difference. 52
  31. Conventional Visualization of Datafllow • Tensorboard • tfgraphviz • Review

    the dataflow and the code by PullRequest-View/Tool. • Compare the difference of the dataflow • Goal ◦ Reviewable ▪ Compare original graph with modified graph easily. ▪ We need ascii graph. ◦ Scalability ▪ Google’s network has hundred layer of operations. 53
  32. Related Work for visualization of DAG 54 • Use Image

    ◦ Tensorboard ◦ tfGraphviz using graphviz • Use Ascii ◦ graph-easy ◦ git ◦ graphterm ◦ leaf
  33. Tensorboard 55 • Pros ◦ Sophisticated UI • Cons ◦

    Can not compare a difference of graphs. ◦ Use wide space
  34. tfgraphviz == graphviz 56 • Pros ◦ Sophisticated visualization •

    Cons ◦ Can not compare a difference of graphs.
  35. Limit of using image. 57 • If we use image

    for graph, • We have to compare the difference side by side.
  36. graph-easy 58 • Pros ◦ We can compare the difference

    by diff-command. • Cons ◦ Use wide space
  37. graphterm 60 • Pros ◦ We can compare the difference

    by diff-command. • Cons ◦ Not design with diff-command.
  38. graphterm 61 • Pros ◦ We can compare the difference

    by diff-command. • Cons ◦ Not design with diff-command. o new node
  39. leaf 62 • Pros ◦ We can compare the difference

    by diff-command. • Cons ◦ Not design with diff-command.
  40. Goal • Make visualization-tool for DAG. • The tool is

    available in current development flow. ◦ Github flow : Pull Request. • Compare the difference of DAG easily. • Scalability of showing large dataflow. 63