Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: blackjax-devs/blackjax
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.2.0
Choose a base ref
...
head repository: blackjax-devs/blackjax
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on May 8, 2024

  1. Copy the full SHA
    3f92393 View commit details
  2. Copy the full SHA
    40efb6c View commit details

Commits on May 13, 2024

  1. Copy the full SHA
    af79fa4 View commit details

Commits on May 16, 2024

  1. Enable fitlering of AdaptationInfo (#674)

    * enable AdaptationInfo filtering
    
    * revert progress_bar
    
    * fix pre-commit
    
    * fix empty sets
    
    * enable adapt info filtering for all adaptation algorithms
    
    * fix precommit /progressbar=True
    
    * change filter tuple to use tree_map
    andrewdipper authored May 16, 2024
    Copy the full SHA
    cd91e41 View commit details

Commits on May 20, 2024

  1. Update run_inference_algorithm to split initial_position and `ini…

    …tial_state` (#672)
    
    * UPDATE DOCSTRING
    
    * ADD STREAMING VERSION
    
    * UPDATE TESTS
    
    * ADD DOCSTRING
    
    * ADD TEST
    
    * REFACTOR RUN_INFERENCE_ALGORITHM
    
    * UPDATE DOCSTRING
    
    * Precommit
    
    * CLEAN TESTS
    
    * ADD INITIAL_POSITION
    
    * FIX TEST
    
    * RENAME O
    
    * FIX DOCSTRING
    
    * PUT EXPECTATION AFTER TRANSFORM
    reubenharry authored May 20, 2024
    Copy the full SHA
    e0a7f9e View commit details

Commits on May 25, 2024

  1. Preconditioned mclmc (#673)

    * TESTS
    
    * TESTS
    
    * UPDATE DOCSTRING
    
    * ADD STREAMING VERSION
    
    * ADD PRECONDITIONING TO MCLMC
    
    * ADD PRECONDITIONING TO TUNING FOR MCLMC
    
    * UPDATE GITIGNORE
    
    * UPDATE GITIGNORE
    
    * UPDATE TESTS
    
    * UPDATE TESTS
    
    * ADD DOCSTRING
    
    * ADD TEST
    
    * STREAMING AVERAGE
    
    * ADD TEST
    
    * REFACTOR RUN_INFERENCE_ALGORITHM
    
    * UPDATE DOCSTRING
    
    * Precommit
    
    * CLEAN TESTS
    
    * GITIGNORE
    
    * PRECOMMIT CLEAN UP
    
    * ADD INITIAL_POSITION
    
    * FIX TEST
    
    * ADD TEST
    
    * REMOVE BENCHMARKS
    
    * BUG FIX
    
    * CHANGE PRECISION
    
    * CHANGE PRECISION
    
    * RENAME O
    
    * UPDATE STREAMING AVG
    
    * UPDATE PR
    
    * RENAME STD_MAT
    reubenharry authored May 25, 2024
    Copy the full SHA
    5831740 View commit details

Commits on May 27, 2024

  1. New integrator, and add some metadata to integrators.py (#681)

    * TESTS
    
    * TESTS
    
    * UPDATE DOCSTRING
    
    * ADD STREAMING VERSION
    
    * ADD PRECONDITIONING TO MCLMC
    
    * ADD PRECONDITIONING TO TUNING FOR MCLMC
    
    * UPDATE GITIGNORE
    
    * UPDATE GITIGNORE
    
    * UPDATE TESTS
    
    * UPDATE TESTS
    
    * ADD DOCSTRING
    
    * ADD TEST
    
    * STREAMING AVERAGE
    
    * ADD TEST
    
    * REFACTOR RUN_INFERENCE_ALGORITHM
    
    * UPDATE DOCSTRING
    
    * Precommit
    
    * CLEAN TESTS
    
    * GITIGNORE
    
    * PRECOMMIT CLEAN UP
    
    * FIX SPELLING, ADD OMELYAN, EXPORT COEFFICIENTS
    
    * TEMPORARILY ADD BENCHMARKS
    
    * ADD INITIAL_POSITION
    
    * FIX TEST
    
    * CLEAN UP
    
    * REMOVE BENCHMARKS
    
    * ADD TEST
    
    * REMOVE BENCHMARKS
    
    * BUG FIX
    
    * CHANGE PRECISION
    
    * CHANGE PRECISION
    
    * ADD OMELYAN TEST
    
    * RENAME O
    
    * UPDATE STREAMING AVG
    
    * UPDATE PR
    
    * RENAME STD_MAT
    
    * MERGE MAIN
    
    * REMOVE COEFFICIENT EXPORTS
    reubenharry authored May 27, 2024
    Copy the full SHA
    20666de View commit details
  2. Minor formatting (#685)

    * Minor formatting
    
    * formatting
    
    * fix test
    
    * formatting
    junpenglao authored May 27, 2024
    Copy the full SHA
    360ac3b View commit details

Commits on Jun 3, 2024

  1. Copy the full SHA
    3fbdac6 View commit details
  2. FIX KWARG BUG (#686)

    * FIX KWARG BUG
    
    * FIX KWARG BUG
    reubenharry authored Jun 3, 2024
    Copy the full SHA
    a3e235f View commit details
  3. Copy the full SHA
    83bc3a0 View commit details

Commits on Jun 5, 2024

  1. Apply function on pytree directly. (#692)

    * Apply function on pytree directly.
    
    Avoiding unnecssary unpacking
    
    * Fix kwarg
    junpenglao authored Jun 5, 2024
    Copy the full SHA
    a4408d3 View commit details
  2. Copy the full SHA
    dd9ba03 View commit details

Commits on Jun 15, 2024

  1. Enable shared mcmc parameters with tempered smc (#694)

    * add parameter filtering
    
    * fix parameter split + docstring
    
    * change extend_paramss
    andrewdipper authored Jun 15, 2024
    Copy the full SHA
    3353209 View commit details

Commits on Jun 20, 2024

  1. Copy the full SHA
    eca35ab View commit details

Commits on Jun 24, 2024

  1. Copy the full SHA
    5764a2b View commit details
  2. Fix doc mistakes (#701)

    * Fix equation formatting
    
    * Clarify JAX gradient error
    
    * Fix punctuation + capitalization
    
    * Fix grammar
    
    Should not begin sentence with "i.e." in English.
    
    * Fix math formatting error
    
    * Fix typo
    
    Change parallel _ensample_ chain adaptation to parallel _ensemble_ chain adaptation.
    
    * Add SVGD citation to appear in doc
    
    Currently the SVGD paper is only cited in the `kernel` function, which is defined _within_ the `build_kernel` function. Because of this nested function format, the SVGD paper is _not_ cited in the documentation.
    
    To fix this, I added a citation to the SVGD paper in the `as_top_level_api` docstring.
    
    * Fix grammar + clarify doc
    
    * Fix typo
    
    ---------
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    gil2rok and junpenglao authored Jun 24, 2024
    Copy the full SHA
    f8db9aa View commit details

Commits on Jul 31, 2024

  1. Update index.md (#711)

    The jitted step remained unused, leading to the example running with an uncompiled nuts.step. 
    
    Changing this reduces the execution time by a factor of 30 on my system and showcases blackjax' speed.
    johannahaffner authored Jul 31, 2024
    Copy the full SHA
    441412a View commit details

Commits on Aug 7, 2024

  1. Enable progress bar under pmap (#712)

    * enable pmap progbar
    
    * fix bar creation
    
    * add locking
    
    * fix formatting
    
    * switch to using chain state
    andrewdipper authored Aug 7, 2024
    Copy the full SHA
    27dfc9e View commit details

Commits on Aug 9, 2024

  1. remove labels (#716)

    andrewdipper authored Aug 9, 2024
    Copy the full SHA
    148c028 View commit details

Commits on Aug 12, 2024

  1. Simplify run_inference_algorithm (#714)

    * fix minor type errors
    
    * storing only expectation values
    
    * fixed memory efficient sampling
    
    * clean up
    
    * renaming vars
    
    * precommit fixes
    
    * fixing tests
    
    * fixing tests
    
    * fixing tests
    
    * fixing tests
    
    * fixing tests
    
    * merge main
    
    * burn in and fix tests
    
    * burn in and fix tests
    
    * minor fixes
    
    * minor fixes
    
    * minor fixes
    
    ---------
    
    Co-authored-by: jakob.robnik@gmail.com <jakob.robnik@gmail.com>
    reubenharry and JakobRobnik authored Aug 12, 2024
    Copy the full SHA
    7135fd7 View commit details

Commits on Aug 13, 2024

  1. Copy the full SHA
    834f55d View commit details
  2. Update README.md (#719)

    gil2rok authored Aug 13, 2024
    Copy the full SHA
    4a11236 View commit details

Commits on Aug 24, 2024

  1. Bug fix (#724)

    * bug fix; first part
    
    * bug fix; first part
    
    * further debug
    
    * remove print statements
    reubenharry authored Aug 24, 2024
    Copy the full SHA
    072cc81 View commit details

Commits on Aug 26, 2024

  1. Waste Free SMC available for adaptive tempered and tempered SMC. (#721)

    * extracting taking last
    
    * test passing
    
    * layering
    
    * example
    
    * more
    
    * Adding another example
    
    * tests in place
    
    * rolling back changes
    
    * Adding test for num_mcmc_steps
    
    * format
    
    * better test coverage
    
    * linter
    
    * Flake8
    
    * black
    
    * Update blackjax/smc/waste_free.py
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    
    * fixing linter
    
    ---------
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    ciguaran and junpenglao authored Aug 26, 2024
    Copy the full SHA
    b02b60b View commit details
  2. NaN Handling (#727)

    * bug fix; first part
    
    * bug fix; first part
    
    * further debug
    
    * remove print statements
    
    * handle logdensity nans. mask -> 1 - mask.
    reubenharry authored Aug 26, 2024
    Copy the full SHA
    8a9b546 View commit details

Commits on Sep 16, 2024

  1. Implement metric scaling (#733)

    * Plotting BlackJAX with BlackJAX
    
    * Plotting BlackJAX with BlackJAX
    
    * Proposed implementation for metric scaling
    
    * Add tests and fix some small typing issues raised by pre-commit.
    
    * Fix remaining failing tests
    
    * pre-commit run
    
    * The original implementation was using upper cholesky, I was using lower.
    
    * Fixing a bunch of tests
    
    * Update blackjax/mcmc/metrics.py
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    
    * Update blackjax/mcmc/metrics.py
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    
    * Merged comments from Junpeng
    
    * Merged comments from Junpeng
    
    ---------
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    AdrienCorenflos and junpenglao authored Sep 16, 2024
    Copy the full SHA
    e1d816a View commit details

Commits on Sep 23, 2024

  1. Speed up Schrodinger Follmer test (#741)

    * Plotting BlackJAX with BlackJAX
    
    * Plotting BlackJAX with BlackJAX
    
    * Update blackjax/mcmc/metrics.py
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    
    * Update blackjax/mcmc/metrics.py
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    
    * Merged comments from Junpeng
    
    * Speed up Follmer
    
    ---------
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    AdrienCorenflos and junpenglao authored Sep 23, 2024
    Copy the full SHA
    51625a8 View commit details

Commits on Oct 5, 2024

  1. Partial posteriors SMC and refactor to decouple tempering from SMC co…

    …nstruction (#729)
    
    * extracting taking last
    
    * test passing
    
    * layering
    
    * example
    
    * more
    
    * Adding another example
    
    * tests in place
    
    * rolling back changes
    
    * Adding test for num_mcmc_steps
    
    * format
    
    * better test coverage
    
    * linter
    
    * Flake8
    
    * black
    
    * implementation[
    
    * partial posteriors implementation
    
    * rolling back some changes
    
    * linter
    
    * fixing test
    
    * adding reference
    
    * typo
    
    * exposing in top level api
    
    * reruning precommit
    
    * adding more steps
    
    * smaller step size
    
    * fixes on comments
    
    * small fix on formating
    
    * renaming to data mask
    
    * linter
    ciguaran authored Oct 5, 2024
    1
    Copy the full SHA
    5a25352 View commit details

Commits on Oct 8, 2024

  1. Add pre-conditioning matrix to Barker proposal (#731)

    * Draft pre-conditioning matrix in Barker proposal.
    
    This is a first draft of adding the pre-conditioning to the Barker
    proposal. This follows Algorithms 4 and 5 in Appendix G of the original
    Barker proposal paper. It's somewhat unclear from the paper, but the
    separate step size that was already implemented serves as a global
    scale for the normal distribution of the proposal. The function
    `_compute_acceptance_probability` now takes in the transpose sqrt mass
    matrix and the inverse, also it has been flattened to accomodate
    the corresponding matrix multiplicatios.
    
    * Fix typing of inverse_mass_matrix argument
    Fix typing of mass matrix.
    
    * Fix docstrings.
    
    The original docstring of step_size was incorrect, there is no
    sympletic integrator.
    
    * Make test for Barker in test_sampling run again
    
    We make this possible by adding an identity pre-conditining matrix,
    which should make the test run in the same way as before.
    
    * Add test to ensure correctness of precond matrix
    
    We add a new test to barker.py to ensure that our implementation of
    the preconditioning matrix is correct. We follow Appendix G in the
    paper that mentions that algorithm 4 and 5 (which we implemented)
    should be equivalent to rescaling the parameters and the logdensity
    in a specific way. We implement both approaches when using the barker
    proposal to infer the mean and sigma of a normal distribution. We
    check that with two different random seeds the chains outputted are
    equivalent up to some tolerance.
    
    We also patch the original test in this file by adding an identity
    mass matrix.
    
    * Fix dimensionality of identity matrix
    
    * Add missing mass matrix in missing tests.
    
    * added option to transpose the matrix when scaling
    
    option to transpose the mass_matrix_sqrt or inv_mass_matrix_sqrt was
    necessary for the barker algorithm as far as I can tell. This has not
    been propagated to the riemannian metric
    
    * use the metric scaling function in barker
    
    Here we use the new metric.scale function to perform the operations
    required by the Barker proposal algorithm, instead of passing around
    the mass_matrix_sqrt and inv_mass_matrix_sqrt directly. We also
    make the `inverse_mass_matrix` argument optional to avoid breaking
    the API.
    
    * update test_sampling with barker api
    
    the mass matrix is now an optional argument in barker.
    
    * update test_barker so it works with metric.scale
    
    * fix tests add trans to scale
    
    * add trans argument to riemannian scaling
    
    * no default
    
    * Update barker.py
    
    Make acceptance function metric agnostic
    
    * Update test_barker.py
    
    Add invariance test
    
    * simplify logic to remove _barker_sample_nd
    
    * fix bug so now everything is tree_mapped in barker
    
    * fix test to not use _barker_sample_nd
    
    * Update blackjax/mcmc/metrics.py
    
    make inv and trans required kwarg with type bool in metric.scale
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    
    * Update blackjax/mcmc/metrics.py
    
    lax.cond might not be needed in metric.scale as inv and trans are static kwarg
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    
    * propagate changes of inv, trans as required kwarg
    
    * fix test metrics
    
    ---------
    
    Co-authored-by: Adrien Corenflos <adrien.corenflos@gmail.com>
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    3 people authored Oct 8, 2024
    1
    Copy the full SHA
    b107f9f View commit details

Commits on Oct 30, 2024

  1. Add logjac to logdensity_fn (#751)

    * Add logjac to logdensity_fn
    
    * Refactor logprior_fn in SMCLinearRegressionTestCase
    junpenglao authored Oct 30, 2024
    Copy the full SHA
    65ae00e View commit details

Commits on Jan 2, 2025

  1. Adjusted MCLMC (#675)

    * TESTS
    
    * TESTS
    
    * UPDATE DOCSTRING
    
    * ADD STREAMING VERSION
    
    * ADD PRECONDITIONING TO MCLMC
    
    * ADD PRECONDITIONING TO TUNING FOR MCLMC
    
    * UPDATE GITIGNORE
    
    * UPDATE GITIGNORE
    
    * UPDATE TESTS
    
    * UPDATE TESTS
    
    * ADD DOCSTRING
    
    * ADD TEST
    
    * STREAMING AVERAGE
    
    * ADD TEST
    
    * REFACTOR RUN_INFERENCE_ALGORITHM
    
    * UPDATE DOCSTRING
    
    * Precommit
    
    * CLEAN TESTS
    
    * FIX BAD MERGE
    
    * ADJUSTED MCLMC
    
    * REMOVE BENCHMARKS:
    
    * ADD ADJUSTED MCLMC
    
    * GITIGNORE
    
    * PRECOMMIT CLEAN UP
    
    * FIX SPELLING, ADD OMELYAN, EXPORT COEFFICIENTS
    
    * TEMPORARILY ADD BENCHMARKS
    
    * ADD ADJUSTED MCLMC TUNING
    
    * CLEAN
    
    * UNIFY ADJUSTED MCLMC AND MCHMC
    
    * ADD INITIAL_POSITION
    
    * FIX TEST
    
    * CLEAN UP
    
    * REMOVE BENCHMARKS
    
    * ADD TEST
    
    * REMOVE BENCHMARKS
    
    * MODIFY WINDOW ADAPTATION TO TAKE INTEGRATOR
    
    * MODIFY WINDOW ADAPTATION TO TAKE INTEGRATOR
    
    * BUG FIX
    
    * CHANGE PRECISION
    
    * CHANGE PRECISION
    
    * ADD OMELYAN TEST
    
    * ADD ADJUSTED MCLMC TEST
    
    * ADD ADJUSTED MCLMC TEST
    
    * RENAME O
    
    * UPDATE STREAMING AVG
    
    * UPDATE STREAMING AVG
    
    * FIX MERGE
    
    * UPDATE PR
    
    * RENAME STD_MAT
    
    * RENAME STD_MAT
    
    * RENAME STD_MAT
    
    * MERGE MAIN
    
    * REMOVE COEFFICIENT EXPORTS
    
    * REMOVE COEFFICIENT EXPORTS
    
    * RESOLVE MYPY ISSUE
    
    * RESOLVE MYPY ISSUE
    
    * RETURN EXPECTATION HISTORY
    
    * FIX KWARG BUG
    
    * FIX KWARG BUG
    
    * FIX KWARG BUG IN ADJUSTED MCLMC
    
    * MAKE WINDOW ADAPTATION TAKE INTEGRATOR AS ARGUMENT
    
    * L_proposal_factor
    
    * SPLIT TUNING FOR AMCLMC INTO SEPARATE FILE
    
    * SPLIT TUNING FOR AMCLMC INTO SEPARATE FILE
    
    * RENAME STREAMING_AVERAGE_UPDATE ARGS IN ADJUSTED MCLMC ADAPTATION
    
    * diagnostics
    
    * fix bugs
    
    * FIX MINOR TUNING BUGS
    
    * UPDATE TUNING
    
    * UPDATE TUNING
    
    * UPDATE TUNING
    
    * names
    
    * test
    
    * tuning
    
    * update
    
    * ready for test
    
    * ready for test
    
    * ready for test
    
    * Update blackjax/adaptation/adjusted_mclmc_adaptation.py
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    
    * edit
    
    ---------
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    reubenharry and junpenglao authored Jan 2, 2025
    Copy the full SHA
    df87345 View commit details

Commits on Jan 16, 2025

  1. SMC Pretuning (#765)

    * extracting taking last
    
    * test passing
    
    * layering
    
    * example
    
    * more
    
    * Adding another example
    
    * tests in place
    
    * rolling back changes
    
    * Adding test for num_mcmc_steps
    
    * format
    
    * better test coverage
    
    * linter
    
    * Flake8
    
    * black
    
    * implementation[
    
    * partial posteriors implementation
    
    * rolling back some changes
    
    * linter
    
    * fixing test
    
    * adding reference
    
    * typo
    
    * exposing in top level api
    
    * reruning precommit
    
    * up to now
    
    * one step working
    
    * fixes
    
    * tests passing
    
    * checkpoint tests passing
    
    * more
    
    * tests passing, implementation in place
    
    * tests passing
    
    * rounding
    
    * adding to init
    
    * rollbacks
    
    * rollback
    
    * rollback
    
    * docs
    
    * precommit
    
    * removing extra parameter
    
    * code review updates
    ciguaran authored Jan 16, 2025
    Copy the full SHA
    fc539ca View commit details

Commits on Jan 20, 2025

  1. Remove meeting scheduling (#768)

    * Remove meeting scheduling
    
    * Fix tests
    junpenglao authored Jan 20, 2025
    Copy the full SHA
    a0812be View commit details

Commits on Jan 21, 2025

  1. Adjusted MCLMC (#771)

    * test CI
    
    * test CI
    
    * test CI: add static
    
    * test CI: add static
    
    * test CI: add static tests
    
    * Revert "test CI: add static"
    
    This reverts commit 2db919d.
    
    * Revert "test CI: add static"
    
    This reverts commit fa6558f.
    
    * test CI: add static tests
    
    * test CI: add static tests
    
    * test CI: add static tests
    
    * test CI: old tests
    
    * test CI: old tests
    
    * test CI: old tests with addition
    
    * test CI: old tests with addition of num tuning steps
    reubenharry authored Jan 21, 2025
    Copy the full SHA
    4d4eae0 View commit details

Commits on Jan 22, 2025

  1. test in place (#772)

    ciguaran authored Jan 22, 2025
    Copy the full SHA
    a053bed View commit details

Commits on Feb 18, 2025

  1. MCLMC adaptation total num steps and initial guess (#778)

    * total_num_tuning_integrator_steps
    
    * Initial params for MCLMC adaptation
    hsimonfroy authored Feb 18, 2025
    Copy the full SHA
    3f0cbb7 View commit details

Commits on Feb 19, 2025

  1. SMC: Joint tuning and pretuning (#776)

    * impl
    
    * rename
    
    * docs
    
    ---------
    
    Co-authored-by: Junpeng Lao <junpenglao@gmail.com>
    ciguaran and junpenglao authored Feb 19, 2025
    Copy the full SHA
    7e4241f View commit details
Showing with 4,147 additions and 754 deletions.
  1. +0 −48 .github/workflows/nightly.yml
  2. +0 −18 .github/workflows/schedule-meeting.yml
  3. +4 −9 README.md
  4. +11 −2 blackjax/__init__.py
  5. +404 −0 blackjax/adaptation/adjusted_mclmc_adaptation.py
  6. +34 −1 blackjax/adaptation/base.py
  7. +9 −5 blackjax/adaptation/chees_adaptation.py
  8. +120 −77 blackjax/adaptation/mclmc_adaptation.py
  9. +11 −7 blackjax/adaptation/meads_adaptation.py
  10. +8 −2 blackjax/adaptation/pathfinder_adaptation.py
  11. +19 −12 blackjax/adaptation/window_adaptation.py
  12. +1 −1 blackjax/base.py
  13. +3 −0 blackjax/diagnostics.py
  14. +4 −0 blackjax/mcmc/__init__.py
  15. +242 −0 blackjax/mcmc/adjusted_mclmc.py
  16. +259 −0 blackjax/mcmc/adjusted_mclmc_dynamic.py
  17. +79 −67 blackjax/mcmc/barker.py
  18. +7 −2 blackjax/mcmc/ghmc.py
  19. +146 −54 blackjax/mcmc/integrators.py
  20. +13 −38 blackjax/mcmc/mclmc.py
  21. +146 −63 blackjax/mcmc/metrics.py
  22. +1 −1 blackjax/mcmc/periodic_orbital.py
  23. +3 −3 blackjax/mcmc/proposal.py
  24. +2 −8 blackjax/mcmc/termination.py
  25. +1 −1 blackjax/mcmc/trajectory.py
  26. +47 −22 blackjax/progress_bar.py
  27. +1 −0 blackjax/smc/__init__.py
  28. +6 −1 blackjax/smc/adaptive_tempered.py
  29. +29 −4 blackjax/smc/base.py
  30. +75 −0 blackjax/smc/from_mcmc.py
  31. +44 −6 blackjax/smc/inner_kernel_tuning.py
  32. +127 −0 blackjax/smc/partial_posteriors_path.py
  33. +352 −0 blackjax/smc/pretuning.py
  34. +30 −22 blackjax/smc/tempered.py
  35. +1 −0 blackjax/smc/tuning/from_kernel_info.py
  36. +6 −8 blackjax/smc/tuning/from_particles.py
  37. +70 −0 blackjax/smc/waste_free.py
  38. +4 −0 blackjax/types.py
  39. +143 −31 blackjax/util.py
  40. +1 −1 blackjax/vi/svgd.py
  41. +6 −7 docs/examples/howto_custom_gradients.md
  42. +2 −1 docs/examples/howto_sample_multiple_chains.md
  43. +2 −1 docs/examples/quickstart.md
  44. +1 −7 docs/index.md
  45. +22 −0 docs/refs.bib
  46. +2 −2 requirements-doc.txt
  47. +58 −5 tests/adaptation/test_adaptation.py
  48. +126 −2 tests/mcmc/test_barker.py
  49. +31 −12 tests/mcmc/test_integrators.py
  50. +157 −10 tests/mcmc/test_metrics.py
  51. +8 −14 tests/mcmc/test_proposal.py
  52. +410 −49 tests/mcmc/test_sampling.py
  53. +4 −1 tests/mcmc/test_trajectory.py
  54. +1 −1 tests/mcmc/test_uturn.py
  55. +30 −6 tests/smc/__init__.py
  56. +146 −36 tests/smc/test_inner_kernel_tuning.py
  57. +4 −6 tests/smc/test_kernel_compatibility.py
  58. +88 −0 tests/smc/test_partial_posteriors_smc.py
  59. +286 −0 tests/smc/test_pretuning.py
  60. +46 −61 tests/smc/test_smc.py
  61. +16 −6 tests/smc/test_tempered_smc.py
  62. +163 −0 tests/smc/test_waste_free_smc.py
  63. +5 −2 tests/test_benchmarks.py
  64. +69 −10 tests/test_util.py
  65. +1 −1 tests/vi/test_schrodinger_follmer.py
48 changes: 0 additions & 48 deletions .github/workflows/nightly.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/schedule-meeting.yml

This file was deleted.

13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -41,12 +41,6 @@ or via conda-forge:
conda install -c conda-forge blackjax
```

Nightly builds (bleeding edge) of Blackjax can also be installed using `pip`:

```bash
pip install blackjax-nightly
```

BlackJAX is written in pure Python but depends on XLA via JAX. By default, the
version of JAX that will be installed along with BlackJAX will make your code
run on CPU only. **If you want to use BlackJAX on GPU/TPU** we recommend you follow
@@ -81,9 +75,10 @@ state = nuts.init(initial_position)

# Iterate
rng_key = jax.random.key(0)
for step in range(100):
nuts_key = jax.random.fold_in(rng_key, step)
state, _ = nuts.step(nuts_key, state)
step = jax.jit(nuts.step)
for i in range(100):
nuts_key = jax.random.fold_in(rng_key, i)
state, _ = step(nuts_key, state)
```

See [the documentation](https://blackjax-devs.github.io/blackjax/index.html) for more examples of how to use the library: how to write inference loops for one or several chains, how to use the Stan warmup, etc.
13 changes: 11 additions & 2 deletions blackjax/__init__.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

from blackjax._version import __version__

from .adaptation.adjusted_mclmc_adaptation import adjusted_mclmc_find_L_and_step_size
from .adaptation.chees_adaptation import chees_adaptation
from .adaptation.mclmc_adaptation import mclmc_find_L_and_step_size
from .adaptation.meads_adaptation import meads_adaptation
@@ -11,6 +12,8 @@
from .base import SamplingAlgorithm, VIAlgorithm
from .diagnostics import effective_sample_size as ess
from .diagnostics import potential_scale_reduction as rhat
from .mcmc import adjusted_mclmc as _adjusted_mclmc
from .mcmc import adjusted_mclmc_dynamic as _adjusted_mclmc_dynamic
from .mcmc import barker
from .mcmc import dynamic_hmc as _dynamic_hmc
from .mcmc import elliptical_slice as _elliptical_slice
@@ -35,6 +38,8 @@
from .sgmcmc import sgnht as _sgnht
from .smc import adaptive_tempered
from .smc import inner_kernel_tuning as _inner_kernel_tuning
from .smc import partial_posteriors_path as _partial_posteriors_smc
from .smc import pretuning as _pretuning
from .smc import tempered
from .vi import meanfield_vi as _meanfield_vi
from .vi import pathfinder as _pathfinder
@@ -109,6 +114,8 @@ def generate_top_level_api_from(module):
additive_step_random_walk.register_factory("normal_random_walk", normal_random_walk)

mclmc = generate_top_level_api_from(_mclmc)
adjusted_mclmc_dynamic = generate_top_level_api_from(_adjusted_mclmc_dynamic)
adjusted_mclmc = generate_top_level_api_from(_adjusted_mclmc)
elliptical_slice = generate_top_level_api_from(_elliptical_slice)
ghmc = generate_top_level_api_from(_ghmc)
barker_proposal = generate_top_level_api_from(barker)
@@ -119,8 +126,9 @@ def generate_top_level_api_from(module):
adaptive_tempered_smc = generate_top_level_api_from(adaptive_tempered)
tempered_smc = generate_top_level_api_from(tempered)
inner_kernel_tuning = generate_top_level_api_from(_inner_kernel_tuning)

smc_family = [tempered_smc, adaptive_tempered_smc]
partial_posteriors_smc = generate_top_level_api_from(_partial_posteriors_smc)
pretuning = generate_top_level_api_from(_pretuning)
smc_family = [tempered_smc, adaptive_tempered_smc, partial_posteriors_smc]
"Step_fn returning state has a .particles attribute"

# stochastic gradient mcmc
@@ -158,6 +166,7 @@ def generate_top_level_api_from(module):
"chees_adaptation",
"pathfinder_adaptation",
"mclmc_find_L_and_step_size", # mclmc adaptation
"adjusted_mclmc_find_L_and_step_size", # adjusted mclmc adaptation
"ess", # diagnostics
"rhat",
]
Loading