Slide 1

Slide 1 text

Dataflow Visualization Using ASCII DAG Junji Hashimoto(GREE, Inc.) 2018/12/04 rev0.2 1

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

Outline ● Why we visualize DAG? ● Background and Motivation ● Left Aligned ASCII DAG(Proposed Visualization) ● Result and Future Works 3

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

Outline ● Why we visualize DAG? ● Background and Motivation ○ Development Flow ○ Long Dataflow ● Left Aligned ASCII DAG(Proposed Visualization) ● Result and Future Work 5

Slide 6

Slide 6 text

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.

Slide 7

Slide 7 text

Review: github flow known as Pull Request 7

Slide 8

Slide 8 text

Review: github flow known as Pull Request 8

Slide 9

Slide 9 text

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.

Slide 10

Slide 10 text

Long Dataflow (Inception-V3) 10 65 Layers

Slide 11

Slide 11 text

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.

Slide 12

Slide 12 text

Outline ● Why we visualize DAG? ● Background and Motivation ● Left Aligned ASCII DAG(Proposed Visualization) ○ Project Goal ○ Developed Visualization Tool ● Result and Future Work 12

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

Left Aligned DAG(Proposed Visualization) ● Feature ○ Use ASCII ○ Left Aligned ○ Compact 14 Proposed Visualization Graphviz(Conventional Visualization)

Slide 15

Slide 15 text

The changes of the codes in proposed visualization. 15 Original Insert L8 Diff

Slide 16

Slide 16 text

Performance for large DAG: Inception-V3 16 Graphviz : 44 sec Proposed method: 14sec It looks nice?

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

18 END

Slide 19

Slide 19 text

Jupyter Notebook 19

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

Rendering Algorithm: Get The Depth of All Nodes 21

Slide 22

Slide 22 text

Rendering Algorithm 22 0

Slide 23

Slide 23 text

Rendering Algorithm 23 1 0

Slide 24

Slide 24 text

Rendering Algorithm 24 2 2 2 2 1 0

Slide 25

Slide 25 text

Rendering Algorithm 25 3 3 2 2 2 2 1 0

Slide 26

Slide 26 text

Rendering Algorithm: Get The Reverse Depth 26 3 3 2 2 2 2 1 0 0 0 1 0 0 0 2 3

Slide 27

Slide 27 text

Rendering Algorithm: Allocate Nodes 27 3 3 2 2 2 2 1 0 0 0 1 0 0 0 2 3

Slide 28

Slide 28 text

Rendering Algorithm: Write All Edges 28 3 3 2 2 2 2 1 0 0 0 1 0 0 0 2 3

Slide 29

Slide 29 text

Benchmark: Inception-V3 29

Slide 30

Slide 30 text

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.

Slide 31

Slide 31 text

Tensorboard 31 ● Pros ○ Sophisticated UI ● Cons ○ Can not compare a difference of graphs. ○ Use wide space

Slide 32

Slide 32 text

tfGraphviz == graphviz 32 ● Pros ○ Sophisticated visualization ● Cons ○ Can not compare a difference of graphs.

Slide 33

Slide 33 text

Limit of using image. 33 ● If we use image for graph, ● We have to compare the difference side by side.

Slide 34

Slide 34 text

graph-easy 34 ● Pros ○ We can compare the difference by diff-command. ● Cons ○ Use wide space

Slide 35

Slide 35 text

git 35 ● Pros ○ We can compare the difference by diff-command. ● Cons

Slide 36

Slide 36 text

graphterm 36 ● Pros ○ We can compare the difference by diff-command. ● Cons ○ Not design with diff-command.

Slide 37

Slide 37 text

graphterm 37 ● Pros ○ We can compare the difference by diff-command. ● Cons ○ Not design with diff-command. o new node

Slide 38

Slide 38 text

leaf 38 ● Pros ○ We can compare the difference by diff-command. ● Cons ○ Not design with diff-command.

Slide 39

Slide 39 text

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.

Slide 40

Slide 40 text

Proposed Visualization 40 Proposed Visualization of DAG graphviz Left Aligned ASCII Format

Slide 41

Slide 41 text

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

Slide 42

Slide 42 text

Goal ● Why Agile? ○ A project’s goal is always changed. ○ We have to keep 42

Slide 43

Slide 43 text

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

Slide 44

Slide 44 text

Long Dataflow (Inception-V3) 44 65 Layers

Slide 45

Slide 45 text

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.

Slide 46

Slide 46 text

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

Slide 47

Slide 47 text

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

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

Review: github flow known as Pull Request 49

Slide 50

Slide 50 text

Review: github flow known as Pull Request 50

Slide 51

Slide 51 text

Review: github flow known as Pull Request 51 We want to review the code and the dataflow.

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

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

Slide 54

Slide 54 text

Related Work for visualization of DAG 54 ● Use Image ○ Tensorboard ○ tfGraphviz using graphviz ● Use Ascii ○ graph-easy ○ git ○ graphterm ○ leaf

Slide 55

Slide 55 text

Tensorboard 55 ● Pros ○ Sophisticated UI ● Cons ○ Can not compare a difference of graphs. ○ Use wide space

Slide 56

Slide 56 text

tfgraphviz == graphviz 56 ● Pros ○ Sophisticated visualization ● Cons ○ Can not compare a difference of graphs.

Slide 57

Slide 57 text

Limit of using image. 57 ● If we use image for graph, ● We have to compare the difference side by side.

Slide 58

Slide 58 text

graph-easy 58 ● Pros ○ We can compare the difference by diff-command. ● Cons ○ Use wide space

Slide 59

Slide 59 text

git 59 ● Pros ○ We can compare the difference by diff-command. ● Cons

Slide 60

Slide 60 text

graphterm 60 ● Pros ○ We can compare the difference by diff-command. ● Cons ○ Not design with diff-command.

Slide 61

Slide 61 text

graphterm 61 ● Pros ○ We can compare the difference by diff-command. ● Cons ○ Not design with diff-command. o new node

Slide 62

Slide 62 text

leaf 62 ● Pros ○ We can compare the difference by diff-command. ● Cons ○ Not design with diff-command.

Slide 63

Slide 63 text

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