Skip to main content

No project description provided

Project description

Build Status

A functional composition framework that supports:

  1. State - functions which retain state for their next turn of action.
  2. Ambiguity - non deterministic composition with priorities.
  3. Injection of compositions into long pipelines (deep dependency injection).
  4. Non cancerous asyncio support.

pip install computation-graph

To deploy: python setup.py sdist bdist_wheel; twine upload dist/*; rm -rf dist/;

Debugging

We need graphviz to visualize computation graphs:

sudo apt update && apt install graphviz
pip install pygraphviz

Debugging is possible by setting config.DEBUG_SAVE_COMPUTATION_TRACE = True or environment variable CG_DEBUG_SAVE_COMPUTATION_TRACE to true/t/1. This will save a file, on each graph execution, named computation.dot to current working directory.

You can use this file in a graph viewer like gephi. Nodes colored red are part of the 'winning' computation path. Each of these nodes has the attributes 'result' and 'state'. 'result' is the output of the node, and 'state' is the new state of the node.

In gephi you can filter for the nodes participating in calculation of final result by filtering on result != null.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

computation-graph-2.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

computation_graph-2-py3-none-any.whl (64.8 kB view details)

Uploaded Python 3

File details

Details for the file computation-graph-2.tar.gz.

File metadata

  • Download URL: computation-graph-2.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for computation-graph-2.tar.gz
Algorithm Hash digest
SHA256 68b367879e547934053b83ef9e9da41ec5e6df07d3a717c8d69d6dcccba6cfc0
MD5 b8f7937a0d3ba03f29cbbb71d4e238ff
BLAKE2b-256 7e36ad3c671d1023324995a7146c2b4859a279fe2d2d1957ef364769f7958154

See more details on using hashes here.

File details

Details for the file computation_graph-2-py3-none-any.whl.

File metadata

  • Download URL: computation_graph-2-py3-none-any.whl
  • Upload date:
  • Size: 64.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for computation_graph-2-py3-none-any.whl
Algorithm Hash digest
SHA256 2137c0ecf6fad2432217de641da20c299fd76fbeb83d8d8495af9445ae671d36
MD5 0588d15c08bd7ce73689a313497f2f08
BLAKE2b-256 13cc0e353bfe25d4944c36170a01490f4f1157d84f6d6d5837107caac1ae8434

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page