Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

MiniBM #1415

Closed
Closed

Conversation

horizon-blue
Copy link
Contributor

Summary:
This diff introduces MiniBM, a minimal implementation of Bean Machine in a little bit more than 100 lines of code.

The script comes with an implementation of the Metropolis Hastings algorithm and a coin flipping model at the end. It is standalone, in that MiniBM does not depend on the Bean Machine framework at all. To try it out, you can simply download minibm.py and run it with

python minibm.py

The only two dependencies for MiniBM are the PyTorch library and tqdm (for progress bar).

The goal of this file is to help developers get familiar with key Bean Machine concepts (such as World and random_variable), instead of providing a performant implementation.

Reviewed By: jpchen

Differential Revision: D27111773

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Apr 22, 2022
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D27111773

horizon-blue added a commit to horizon-blue/beanmachine that referenced this pull request Apr 22, 2022
Summary:
Pull Request resolved: facebookresearch#1415

This diff introduces MiniBM, a minimal implementation of Bean Machine in a little bit more than 100 lines of code.

The script comes with an implementation of the Metropolis Hastings algorithm and a coin flipping model at the end. It is standalone, in that MiniBM does not depend on the Bean Machine framework at all. To try it out, you can simply download `minibm.py` and run it with

```
python minibm.py
```

The only two dependencies for MiniBM are the PyTorch library and tqdm (for progress bar).

The goal of this file is to help developers get familiar with key Bean Machine concepts (such as `World` and `random_variable`), instead of providing a performant implementation.

Reviewed By: jpchen

Differential Revision: D27111773

fbshipit-source-id: 8ca261af4b8a9ed3546b7296490f8e9b3d6e3db7
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D27111773

horizon-blue added a commit to horizon-blue/beanmachine that referenced this pull request Apr 22, 2022
Summary:
Pull Request resolved: facebookresearch#1415

This diff introduces MiniBM, a minimal implementation of Bean Machine in a little bit more than 100 lines of code.

The script comes with an implementation of the Metropolis Hastings algorithm and a coin flipping model at the end. It is standalone, in that MiniBM does not depend on the Bean Machine framework at all. To try it out, you can simply download `minibm.py` and run it with

```
python minibm.py
```

The only two dependencies for MiniBM are the PyTorch library and tqdm (for progress bar).

The goal of this file is to help developers get familiar with key Bean Machine concepts (such as `World` and `random_variable`), instead of providing a performant implementation.

Reviewed By: jpchen

Differential Revision: D27111773

fbshipit-source-id: 5f7deeb79a409484b9f7ad59ac9c73d21a091417
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D27111773

horizon-blue added a commit to horizon-blue/beanmachine that referenced this pull request Apr 29, 2022
Summary:
Pull Request resolved: facebookresearch#1415

This diff introduces MiniBM, a minimal implementation of Bean Machine in a little bit more than 100 lines of code.

The script comes with an implementation of the Metropolis Hastings algorithm and a coin flipping model at the end. It is standalone, in that MiniBM does not depend on the Bean Machine framework at all. To try it out, you can simply download `minibm.py` and run it with

```
python minibm.py
```

The only two dependencies for MiniBM are the PyTorch library and tqdm (for progress bar).

The goal of this file is to help developers get familiar with key Bean Machine concepts (such as `World` and `random_variable`), instead of providing a performant implementation.

Reviewed By: jpchen

Differential Revision: D27111773

fbshipit-source-id: 5b9783a8020780a74887bf7ac6b695ec2ae00a90
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D27111773

horizon-blue added a commit to horizon-blue/beanmachine that referenced this pull request Apr 29, 2022
Summary:
Pull Request resolved: facebookresearch#1415

This diff introduces MiniBM, a minimal implementation of Bean Machine in a little bit more than 100 lines of code.

The script comes with an implementation of the Metropolis Hastings algorithm and a coin flipping model at the end. It is standalone, in that MiniBM does not depend on the Bean Machine framework at all. To try it out, you can simply download `minibm.py` and run it with

```
python minibm.py
```

The only two dependencies for MiniBM are the PyTorch library and tqdm (for progress bar).

The goal of this file is to help developers get familiar with key Bean Machine concepts (such as `World` and `random_variable`), instead of providing a performant implementation.

Reviewed By: jpchen

Differential Revision: D27111773

fbshipit-source-id: 83324048140a2dbad6b407493c6fabd2212d88dd
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D27111773

horizon-blue added a commit to horizon-blue/beanmachine that referenced this pull request Apr 29, 2022
Summary:
Pull Request resolved: facebookresearch#1415

This diff introduces MiniBM, a minimal implementation of Bean Machine in a little bit more than 100 lines of code.

The script comes with an implementation of the Metropolis Hastings algorithm and a coin flipping model at the end. It is standalone, in that MiniBM does not depend on the Bean Machine framework at all. To try it out, you can simply download `minibm.py` and run it with

```
python minibm.py
```

The only two dependencies for MiniBM are the PyTorch library and tqdm (for progress bar).

The goal of this file is to help developers get familiar with key Bean Machine concepts (such as `World` and `random_variable`), instead of providing a performant implementation.

Reviewed By: jpchen

Differential Revision: D27111773

fbshipit-source-id: a0e553206c521bccfcd6153569904e5665cf8982
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D27111773

Summary:
Pull Request resolved: facebookresearch#1415

This diff introduces MiniBM, a minimal implementation of Bean Machine in a little bit more than 100 lines of code.

The script comes with an implementation of the Metropolis Hastings algorithm and a coin flipping model at the end. It is standalone, in that MiniBM does not depend on the Bean Machine framework at all. To try it out, you can simply download `minibm.py` and run it with

```
python minibm.py
```

The only two dependencies for MiniBM are the PyTorch library and tqdm (for progress bar).

The goal of this file is to help developers get familiar with key Bean Machine concepts (such as `World` and `random_variable`), instead of providing a performant implementation.

Reviewed By: jpchen

Differential Revision: D27111773

fbshipit-source-id: b19d6d04c5132c279e4f8af361451779e2a068c0
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D27111773

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants