facebookincubator / flowtorch

This library would form a permanent home for reusable components for deep probabilistic programming. The library would form and harness a community of users and contributors by focusing initially on complete infra and documentation for how to use and create components.
https://flowtorch.ai
MIT License
300 stars 21 forks source link

First interesting tutorial: Bayesian Inference with Transport score climbing #95

Closed stefanwebb closed 6 months ago

stefanwebb commented 2 years ago

Motivation

A new tutorial based on Transport Score Climbing (https://arxiv.org/pdf/2202.01841.pdf). TSC is a recently developed method for Bayesian inference that combines MCMC and VI ideas, making use of normalizing flows.

Changes proposed

Adding /tutorials/transport_score_climbing.ipynb and flowtorch.distributions.Banana

Test Plan

Ensure notebook runs without any errors.

codecov-commenter commented 2 years ago

Codecov Report

Merging #95 (c1f4223) into main (45e91ca) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #95   +/-   ##
=======================================
  Coverage   98.23%   98.23%           
=======================================
  Files           6        6           
  Lines         227      227           
=======================================
  Hits          223      223           
  Misses          4        4           
Flag Coverage Δ
unittests 98.23% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tests/test_bijector.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 45e91ca...c1f4223. Read the comment docs.

stefanwebb commented 2 years ago

Currently blocked by having to implement a few steps of HMC in the training loop... I am going to implement this from scratch and see how I can abstract MCMC transition kernels etc. in a future extension to the API