Manage, maintain and reuse complex function graphs without the hassle.
Project description
Fn Graph
Lightweight function pipelines for python
For more information and live examples look at fn-graph.businessoptics.biz
Overview
fn_graph
is trying to solve a number of problems in the python data-science/modelling domain, as well as making it easier to put such models into production.
It aims to:
- Make moving between the analyst space to production, and back, simpler and less error prone.
- Make it easy to view the intermediate results of computations to easily diagnose errors.
- Solve common analyst issues like creating reusable, composable pipelines and caching results.
- Visualizing models in an intuitive way.
There is an associated visual studio you should check out at https://github.com/BusinessOptics/fn_graph_studio/.
Documentation
Please find detailed documentation at https://fn-graph.readthedocs.io/
Installation
pip install fn_graph
You will need to have graphviz and the development packages installed. On ubuntu you can install these with:
sudo apt-get install graphviz graphviz-dev
Otherwise see the pygraphviz documentation.
To run all the examples install
pip install fn_graph[examples]
Features
-
Manage complex logic
Manage your data processing, machine learning, domain or financial logic all in one simple unified framework. Make models that are easy to understand at a meaningful level of abstraction. -
Hassle free moves to production
Take the models your data-scientist and analysts build and move them into your production environment, whether thats a task runner, web-application, or an API. No recoding, no wrapping notebook code in massive and opaque functions. When analysts need to make changes they can easily investigate all the models steps. -
Lightweight
Fn Graph is extremely minimal. Develop your model as plain python functions and it will connect everything together. There is no complex object model to learn or heavy weight framework code to manage. -
Visual model explorer
Easily navigate and investigate your models with the visual fn_graph_studio. Share knowledge amongst your team and with all stakeholders. Quickly isolate interesting results or problematic errors. Visually display your results with any popular plotting libraries. -
Work with or without notebooks
Use fn_graph as a complement to your notebooks, or use it with your standard development tools, or both. -
Works with whatever libraries you use
fn_graph makes no assumptions about what libraries you use. Use your favorite machine learning libraries like, scikit-learn, PyTorch. Prepare your data with data with Pandas or Numpy. Crunch big data with PySpark or Beam. Plot results with matplotlib, seaborn or Plotly. Use statistical routines from Scipy or your favourite financial libraries. Or just use plain old Python, it's up to you. -
Useful modelling support tools
Integrated and intelligent caching improves modelling development iteration time, a simple profiler works at a level that's meaningful to your model. ** Easily compose and reuse models*
The composable pipelines allow for easy model reuse, as well as building up models from simpler submodels. Easily collaborate in teams to build models to any level of complexity, while keeping the individual components easy to understand and well encapsulated. -
It's just Python functions
It's just plain Python! Use all your existing knowledge, everything will work as expected. Integrate with any existing python codebases. Use it with any other framework, there are no restrictions.
Similar projects
An incomplete comparison to some other libraries, highlighting the differences:
Dask
Dask is a light-weight parallel computing library. Importantly it has a Pandas compliant interface. You may want to use Dask inside FnGraph.
Airflow
Airflow is a task manager. It is used to run a series of generally large tasks in an order that meets their dependencies, potentially over multiple machines. It has a whole scheduling and management apparatus around it. Fn Graph is not trying to do this. Fn Graph is about making complex logic more manageable, and easier to move between development and production. You may well want to use Fn Graph inside your airflow tasks.
Luigi
Luigi is a Python module that helps you build complex pipelines of batch jobs. It handles dependency resolution, workflow management, visualization etc. It also comes with Hadoop support built in.
Luigi is about big batch jobs, and managing the distribution and scheduling of them. In the same way that airflow works ate a higher level to FnGraph, so does luigi.
d6tflow
d6tflow is similar to FnGraph. It is based on Luigi. The primary difference is the way the function graphs are composed. d6tflow graphs can be very difficult to reuse (but do have some greater flexibility). It also allows for parallel execution. FnGraph is trying to make very complex pipelines or very complex models easier to mange, build, and productionise.
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
File details
Details for the file fn_graph-0.14.3.tar.gz
.
File metadata
- Download URL: fn_graph-0.14.3.tar.gz
- Upload date:
- Size: 216.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.8.0-49-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dfc52c198cea07b6af974dc7037e4b79b50ac6e45d409c5c679f4d52a0101e7 |
|
MD5 | afc032bad94636cfae6eebec13515515 |
|
BLAKE2b-256 | 34342c9cae7a005b0a900e415a46351fa10fc716defe4890cfc70baf0a14af85 |
File details
Details for the file fn_graph-0.14.3-py3-none-any.whl
.
File metadata
- Download URL: fn_graph-0.14.3-py3-none-any.whl
- Upload date:
- Size: 221.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.8.0-49-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9dd65685a209372426f45b36c979b8f1ce2821f300db9ef57c93a0deb9b32f1 |
|
MD5 | c1c6a2c7b99bd9605976f187232dbb90 |
|
BLAKE2b-256 | 1f044cced567a5fb7d947284a036712402ab0af6d225e923304dc6cdd47d4529 |