facebookresearch / beanmachine

A library that allows for inference on probabilistic models

Home Page:https://beanmachine.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bean Machine

Lint Tests PyPI

Overview

Bean Machine is a probabilistic programming language for inference over statistical models written in the Python language using a declarative syntax. Bean Machine is built on top of PyTorch and Bean Machine Graph, a custom C++ backend. Check out our tutorials and Quick Start to get started!

Installation

Bean Machine supports Python 3.7-3.10 and PyTorch 1.12.

Install the Latest Release with Pip

pip install beanmachine

Install from Source

To download the latest Bean Machine source code from GitHub:

git clone https://github.com/facebookresearch/beanmachine.git
cd beanmachine

Then, you can choose from any of the following installation options.

Package Managers (Conda)

Installing Bean Machine from source requires three external dependencies: Boost, Eigen, and range-v3. We recommend using conda to manage the virtual environment and install the necessary build dependencies.

conda create -n {env name} python=3.8; conda activate {env name}
conda install -c conda-forge boost-cpp eigen range-v3

Once dependencies are installed, install Bean Machine by running Pip:

pip install .

Docker

docker build -t beanmachine .
docker run -it beanmachine:latest bash

Validate Installation

If you would like to run the builtin unit tests:

pip install "beanmachine[test]"
pytest .

License

Bean Machine is MIT licensed, as found in the LICENSE file.

About

A library that allows for inference on probabilistic models

https://beanmachine.org/

License:MIT License


Languages

Language:Python 59.5%Language:C++ 38.9%Language:TypeScript 1.0%Language:JavaScript 0.5%Language:CSS 0.1%Language:Makefile 0.0%Language:C 0.0%Language:Dockerfile 0.0%