Thank you for interested in contributing to Blackjax! We value the following contributions:
- Bug fixes
- Documentation
- High-level sampling algorithms from any family of algorithms: random walk, hamiltonian monte carlo, sequential monte carlo, variational inference, inference compilation, etc.
- New building blocks, e.g. new metrics for HMC, integrators, etc.
- Run
pip install -r requirements.txt
to install all the dev dependencies. - Run
pre-commit run --all-files
andmake test
before pushing on the repo; CI should pass if these pass locally.
The Blackjax repository (and sampling-book) provides examples in the form of Markdown documents. Jupytext can be used by the users to convert their Jupyter notebooks to this format, or convert these documents to Jupyter notebooks. Examples are rendered in the documentation.
To convert any example file to a Jupyter notebook you can use:
jupytext docs/examples/your_example_file.md --to notebook
you can then interact with the resulting notebook just like with any notebook.
If you implemented your example in a Jupyter notebook you can convert your .ipynb
file to Markdown using the command below:
jupytext docs/examples/your_example_notebook.ipynb --to myst
Once the example file is converted to a Markdown file, you have two options for editing:
- Edit the Markdown version as it is a regular Markdown file.
- Edit the Notebook version, then convert it to a Markdown file once you finish editing with the command above. Jupytext can handle the change if the example has the same file name.
Please make sure to only commit the Markdown file.
We use Sphinx
to generate documents for this repo. We highly encourage you to check how your changes to the examples are rendered in the documentation:
- Add your documentation to
docs/examples.rst
- Run the command below:
make build-docs
- Check the generated HTML documentation in
docs/_build