Skip to main content

Evaluation framework for probabilistic programming languages

Project description

Build status PyPI version

Getting Started with PPL Bench

What is PPL Bench?

PPL Bench is a new benchmark framework for evaluating probabilistic programming languages (PPLs).

Installation

  1. Enter a virtual (or conda) environment
  2. Install PPL Bench core via pip:
pip install pplbench
  1. Install PPLs that you wish to benchmark. For PPL-specific instructions, see Installing PPLs. You could also run the following command to install all PPLs that are currently supported by PPL Bench (except for Jags):
pip install pplbench[ppls]

Alternatively, you could also install PPL Bench from source. Please refer to Installing PPLs for instructions.

Getting Started

Let's dive right in with a benchmark run of Bayesian Logistic Regression. To run this, you'll need to install PyStan (if you haven't already):

pip install pystan==2.19.1.1

Then, run PPL Bench with example config:

pplbench examples/example.json

This will create a benchmark run with two trials of Stan on the Bayesian Logistic Regression model. The results of the run are saved in the outputs/ directory.

This is what the Predictive Log Likelihood (PLL) plot should look like: PLL plot of example run PLL half plot of example run

Please see the examples/example.json file to understand the schema for specifying benchmark runs. The schema is documented in pplbench/main.py and can be printed by running the help command:

pplbench -h

A number of models is available in the pplbench/models directory and the PPL implementations are available in the pplbench/ppls directory.

Please feel free to submit pull requests to modify an existing PPL implementation or to add a new PPL or model.

Join the PPL Bench community

For more information about PPL Bench, refer to

  1. Blog post: link
  2. Paper: link
  3. Website: link

See the CONTRIBUTING.md file for how to help out.

License

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

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

pplbench-0.0.3.tar.gz (42.1 kB view details)

Uploaded Source

Built Distribution

pplbench-0.0.3-py3-none-any.whl (77.2 kB view details)

Uploaded Python 3

File details

Details for the file pplbench-0.0.3.tar.gz.

File metadata

  • Download URL: pplbench-0.0.3.tar.gz
  • Upload date:
  • Size: 42.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pplbench-0.0.3.tar.gz
Algorithm Hash digest
SHA256 934717eb4a4adb9e590b03d5fb928180e63b6fb3afea4dff98c599dc5113b9a7
MD5 ebdde20a355f3e819f3f49b14fbb81fc
BLAKE2b-256 dec899084c4f704e79836e68ea39059ff201c8e659d7f32bdb1a61b38432f80b

See more details on using hashes here.

File details

Details for the file pplbench-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pplbench-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 77.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pplbench-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ab88f88dbb138ba6a193f65346f45fc6508cbc86002f00694c3aacf32b3f3ab0
MD5 0900db063448fd0461933bdd065ad231
BLAKE2b-256 d478c3d0b8c4c9879833cc0f5ab4629bade91cb689294c41dd15a1bf81b1cd1e

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