Skip to content
Provenance and caching library for python functions, built for creating lightweight machine learning pipelines
Python Other
  1. Python 99.1%
  2. Other 0.9%
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
provenance Added angled bracket escaping to `elide` Dec 4, 2019
.gitignore Ignoring vscode settings and mypy_cache. Nov 12, 2019
.travis.yml fixup Nov 12, 2019
CONTRIBUTING.rst remove crufty virtualenv related instructions Oct 4, 2018
Dockerfile first stab at making a Dockerfile for binder Jun 5, 2017
HISTORY.rst Updates changelog to reflect upcoming release. Dec 3, 2019
LICENSE.txt adds start of documenation using the fabulous nbsphinx plugin Apr 30, 2017
README.rst Fixes README.rst underline (not long enough) Dec 3, 2019
readthedocs.yml adds readthedocs config file Apr 30, 2017 adds Makefile and notes on release procedure Jan 7, 2017
requirements.txt Adding pyarrow as an explicit dependency to account for parquet seria… Nov 12, 2019
setup.cfg initial open source release Jan 7, 2017
test_requirements.txt Fixes pytorch dep name. Dec 3, 2019



Version Status Build Status Documentation Status

provenance is a Python library for function-level caching and provenance that aids in creating Parsimonious Pythonic Pipelines™. By wrapping functions in the provenance decorator computed results are cached across various tiered stores (disk, S3, SFTP) and provenance (i.e. lineage) information is tracked and stored in an artifact repository. A central artifact repository can be used to enable production pipelines, team collaboration, and reproducible results. The library is general purpose but was built with machine learning pipelines in mind. By leveraging the fantastic joblib library object serialization is optimized for numpy and other PyData libraries.

What that means in practice is that you can easily keep track of how artifacts (models, features, or any object or file) are created, where they are used, and have a central place to store and share these artifacts. This basic plumbing is required (or at least desired!) in any machine learning pipeline and project. provenance can be used standalone along with a build server to run pipelines or in conjunction with more advanced workflow systems (e.g. Airflow, Luigi).


For an explanation of this example please see the Introductory Guide.

import provenance as p


import time

def expensive_add(a, b):
    return a + b

def expensive_mult(a, b):
    return a * b

a1 = expensive_add(4, 3)
a2 = expensive_add(1, 1)

result = expensive_mult(a1, a2)



For the base functionality:

pip install provenance

For the visualization module (which requires graphviz to be installed):

pip install provenance[vis]

For the SFTP store:

pip install provenance[sftp]

For everything all at once:

pip install provenance[all]


provenance is currently only compatible with Python 3.5 and higher. Updating it to work with Python 2.7x should be easy, follow this ticket if you are interested in that.

You can’t perform that action at this time.