The dag-modelling package is a python implementation of the dataflow programming with the lazy graph evaluation.
Project description
Summary
The DAGModelling software is a python implementation of the dataflow programming with the lazy graph evaluation approach.
Main goals:
- Lazy evaluated directed acyclic graph;
- Concise connection syntax;
- Plotting with graphviz;
- Flexibility. The goal of DAG-Modelling is not to be efficient, but rather flexible.
The framework is intented to be used for the statistical analysis of the data of JUNO and Daya Bay neutrino oscillation experiments.
Installation
For users (recommended)
For regular use, it's best to install the latest version of the project that's available on PyPi:
pip install dag-modelling
For developers
We recommend that developers install the package locally in editable mode:
git clone https://github.com/dagflow-team/dag-modelling.git
cd dag-modelling
pip install -e .
This way, the system will track all the changes made to the source files. This means that developers won't need to reinstall the package or set environment variables, even when a branch is changed.
Example
For example, let's consider a sum of three input nodes and then a product of the result with another array.
from numpy import arange
from dag_modelling.core.graph import Graph
from dag_modelling.plot.graphviz import savegraph
from dag_modelling.lib.common import Array
from dag_modelling.lib.arithmetic import Sum, Product
# Define a source data
array = arange(3, dtype="d")
# Check predefined Array, Sum and Product
with Graph(debug=debug) as graph:
# Define nodes
(in1, in2, in3, in4) = (Array(name, array) for name in ("n1", "n2", "n3", "n4"))
s = Sum("sum")
m = Product("product")
# Connect nodes
(in1, in2, in3) >> s
(in4, s) >> m
graph.close()
print("Result:", m.outputs["result"].data) # must print [0. 3. 12.]
savegraph(graph, "dagmodelling_example_1a.png")
The printed result must be [0. 3. 12.], and the created image looks as
For more examples see example/example.py or tests.
Repositories and additional modules
- Main repo:
- Development/CI: https://git.jinr.ru/dagflow-team/dag-modelling
- Contact/pypi/mirror: https://github.com/dagflow-team/dag-modelling
- PYPI: https://pypi.org/project/dag-modelling
- Supplementary python modules:
- dgm-reactor-neutrino — nodes related to reactor neutrino oscillations
- dgm-fit — fitter interface
- Daya Bay model — implementation of the Daya Bay oscillation analysis, development version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dag_modelling-0.13.0.tar.gz.
File metadata
- Download URL: dag_modelling-0.13.0.tar.gz
- Upload date:
- Size: 130.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Linux/6.15.8-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d560098ba00ce4e4cc77deed8cc5b9b7062a1c23b9db3a0fdbe7aca64d0e8e3
|
|
| MD5 |
f611e5abc2f5de74dc2415bbf0f54faa
|
|
| BLAKE2b-256 |
b8864431329138e40f347f8075b43678a5e64306247ef42d89a423477969eea4
|
File details
Details for the file dag_modelling-0.13.0-py3-none-any.whl.
File metadata
- Download URL: dag_modelling-0.13.0-py3-none-any.whl
- Upload date:
- Size: 193.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.5 Linux/6.15.8-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2487efa7d7b75aa5a8aba4a5a89a9a104146d6a36d9dc8a7fd21c46f256c8e6e
|
|
| MD5 |
8bd701e7ceed954a5fd66be6200db649
|
|
| BLAKE2b-256 |
1ad78f1c3e6fb0d22895901da3c2e66a86b5783f9c53e01f96a6bc21773a296a
|