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 replacing to_callable with run.to_callable_with_side_effect with ascii.computation_trace as the first argument. This will save a file on each graph execution 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-13.tar.gz (15.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: computation-graph-13.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.2

File hashes

Hashes for computation-graph-13.tar.gz
Algorithm Hash digest
SHA256 6a6ff42a3be964db3b06b8124c9c1ea50e3ff5296ad96199e638ccfd87500877
MD5 7f75b176f3e5c679a715c9cc6a77b43a
BLAKE2b-256 1ca36534470fc85522ec3fcb3d1a3725bfc86066832cda4955a3f55211cc3c56

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