stackeddag


Namestackeddag JSON
Version 0.3.4 PyPI version JSON
download
home_pagehttps://github.com/junjihashimoto/py-stacked-dag
SummaryA visualization tool to show a ascii graph from Graphviz-Dot-file or Tensorflow
upload_time2022-11-08 11:45:23
maintainer
docs_urlNone
authorJunji Hashimoto
requires_python
licenseMIT
keywords tensorflow tensor machine-learning graphviz ascii dag ml deep-learning neural-network
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            stacked-dag for python
======================

|Build Status|

Ascii DAG for visualization of dataflow

stacked-dag can show Ascii-DAG(Directed acyclic graph) from a Dot file
of graphviz. Dataflow's direction is from top to bottom. 'o' means a
node. A label of the node is shown to the left side. Other characters
are edges of DAG.

A sample of DAG is below.

::

    o o    l0,l4
    |/
    o    l1
    |
    o    l2
    |
    o    l3

Usage with dot
==============

Write a Dot file of graphviz.

::

    $ cat > sample.dot
    digraph graphname {
      0 [label="l0"];
      1 [label="l1"];
      2 [label="l2"];
      3 [label="l3"];
      4 [label="l4"];
      0->1;
      1->2;
      2->3;
      4->1;
    }

Show ascii DAG by following command.

::

    $ python stackeddag.py sample.dot
    o o    l0,l4
    |/
    o    l1
    |
    o    l2
    |
    o    l3

Usage with tensorflow
=====================

::

    import tensorflow as tf
    import stackeddag.tf as sd

    def mydataflow():
      a = tf.constant(1,name="a")
      b = tf.constant(2,name="b")
      c = tf.add(a,b,name="c")
      return tf.get_default_graph()

    print(sd.fromGraph(mydataflow()),end="")

The output is below.

::

    o o    a,b
    |/
    o    c

Another sample
==============

::

    $ python stackeddag.py sample/test.dot
    o
    |
    o
    |\
    o |
    | |\
    o o |
    |\ \ \
    | | |\ \
    | | | | |\
    o o o o o |
    |/ /_/ / /
    | |  / /
    o o o o
    |/_/_/
    o

.. |Build Status| image:: https://travis-ci.org/junjihashimoto/py-stacked-dag.png?branch=master
   :target: https://travis-ci.org/junjihashimoto/py-stacked-dag



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/junjihashimoto/py-stacked-dag",
    "name": "stackeddag",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tensorflow tensor machine-learning graphviz ascii dag ml deep-learning neural-network",
    "author": "Junji Hashimoto",
    "author_email": "junji.hashimoto@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/77/fa/0bd0138ca78cc0e843206c2f14ac9367d2816b638962bee56fb00b8439ab/stackeddag-0.3.4.tar.gz",
    "platform": null,
    "description": "stacked-dag for python\n======================\n\n|Build Status|\n\nAscii DAG for visualization of dataflow\n\nstacked-dag can show Ascii-DAG(Directed acyclic graph) from a Dot file\nof graphviz. Dataflow's direction is from top to bottom. 'o' means a\nnode. A label of the node is shown to the left side. Other characters\nare edges of DAG.\n\nA sample of DAG is below.\n\n::\n\n    o o    l0,l4\n    |/\n    o    l1\n    |\n    o    l2\n    |\n    o    l3\n\nUsage with dot\n==============\n\nWrite a Dot file of graphviz.\n\n::\n\n    $ cat > sample.dot\n    digraph graphname {\n      0 [label=\"l0\"];\n      1 [label=\"l1\"];\n      2 [label=\"l2\"];\n      3 [label=\"l3\"];\n      4 [label=\"l4\"];\n      0->1;\n      1->2;\n      2->3;\n      4->1;\n    }\n\nShow ascii DAG by following command.\n\n::\n\n    $ python stackeddag.py sample.dot\n    o o    l0,l4\n    |/\n    o    l1\n    |\n    o    l2\n    |\n    o    l3\n\nUsage with tensorflow\n=====================\n\n::\n\n    import tensorflow as tf\n    import stackeddag.tf as sd\n\n    def mydataflow():\n      a = tf.constant(1,name=\"a\")\n      b = tf.constant(2,name=\"b\")\n      c = tf.add(a,b,name=\"c\")\n      return tf.get_default_graph()\n\n    print(sd.fromGraph(mydataflow()),end=\"\")\n\nThe output is below.\n\n::\n\n    o o    a,b\n    |/\n    o    c\n\nAnother sample\n==============\n\n::\n\n    $ python stackeddag.py sample/test.dot\n    o\n    |\n    o\n    |\\\n    o |\n    | |\\\n    o o |\n    |\\ \\ \\\n    | | |\\ \\\n    | | | | |\\\n    o o o o o |\n    |/ /_/ / /\n    | |  / /\n    o o o o\n    |/_/_/\n    o\n\n.. |Build Status| image:: https://travis-ci.org/junjihashimoto/py-stacked-dag.png?branch=master\n   :target: https://travis-ci.org/junjihashimoto/py-stacked-dag\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A visualization tool to show a ascii graph from Graphviz-Dot-file or Tensorflow",
    "version": "0.3.4",
    "project_urls": {
        "Homepage": "https://github.com/junjihashimoto/py-stacked-dag"
    },
    "split_keywords": [
        "tensorflow",
        "tensor",
        "machine-learning",
        "graphviz",
        "ascii",
        "dag",
        "ml",
        "deep-learning",
        "neural-network"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77fa0bd0138ca78cc0e843206c2f14ac9367d2816b638962bee56fb00b8439ab",
                "md5": "d6f863dd8836755fcc436bccbfffd202",
                "sha256": "89404050364710f25188812248735fed34dae90c001e35e74bff7fc15a9f970b"
            },
            "downloads": -1,
            "filename": "stackeddag-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "d6f863dd8836755fcc436bccbfffd202",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8938,
            "upload_time": "2022-11-08T11:45:23",
            "upload_time_iso_8601": "2022-11-08T11:45:23.300289Z",
            "url": "https://files.pythonhosted.org/packages/77/fa/0bd0138ca78cc0e843206c2f14ac9367d2816b638962bee56fb00b8439ab/stackeddag-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-11-08 11:45:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "junjihashimoto",
    "github_project": "py-stacked-dag",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "stackeddag"
}
        
Elapsed time: 5.07797s