This is a sandbox repository for documenting my journey learning probabilistic programming & Bayesian statistics.
I've chosen to build this library on top of PyTorch and Pyro given my experience with torch from my deep learning adventures.
To create a conda environment and install bayesian-stats
with poetry:
# Clone repository
git clone [email protected]:libertininick/bayesian-stats.git
# Navigate to local repo directory
cd bayesian-stats
# Update base conda environment
conda update -y -n base -c defaults conda
# Install conda-lock
# conda-lock is used to generate fully reproducible conda environments via a lock file
conda install --channel=conda-forge --name=base conda-lock
# Create conda environment from `conda-lock.yml`
conda-lock install --name bayesian_stats conda-lock.yml
# Activate conda environment
conda activate bayesian_stats
# Install `bayesian-stats` w/ poetry
poetry install --with dev,jupyter
To format code to adhere to our style and run type checking run the following:
ruff check . --fix
mypy src/
To run tests and test coverage, run the following:
coverage erase \
&& coverage run -m pytest \
&& coverage report
To skip slow tests
coverage run -m pytest -m "not slow"