Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update probability distributions guide #7670

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
a11d903
Add type hints to dist() in discrete distributions
johanbog Sep 30, 2023
50123a1
fix wrong import
johanbog Oct 1, 2023
6f6b416
fix non-optional argument set as optional
johanbog Mar 2, 2024
abc9061
Merge branch 'discrete-distributions-type-hints' of https://github.co…
fonnesbeck Oct 26, 2024
703c1ff
Merge branch 'johanbog-discrete-distributions-type-hints'
fonnesbeck Oct 26, 2024
6ee5468
Change order of arguments in `get_related_valued_nodes`
ricardoV94 Oct 18, 2024
88a3503
Only allow measurable transpositions in univariate Elemwise chains or…
ricardoV94 Oct 18, 2024
eb52ce8
Derive matmul probability
ricardoV94 Oct 18, 2024
ae091ca
Unorphan the model transform doc page
Armavica Oct 21, 2024
8191dda
[pre-commit.ci] pre-commit autoupdate (#7545)
pre-commit-ci[bot] Oct 24, 2024
b09efa2
Automatically label PRs based on *closing* issues (#7547)
wd60622 Oct 29, 2024
2d0a471
Bump actions/checkout from 4.2.0 to 4.2.2
dependabot[bot] Oct 28, 2024
f0aa92e
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 28, 2024
ab84c79
Bump docker/setup-buildx-action from 3.4.0 to 3.7.1
dependabot[bot] Oct 29, 2024
4139efa
[pre-commit.ci] pre-commit autoupdate (#7559)
pre-commit-ci[bot] Nov 5, 2024
27dbd0c
Harmonize HSGP.prior dimension names and order (#7562)
juanitorduz Nov 6, 2024
a523514
Avoid deprecation warnings
ricardoV94 Nov 7, 2024
19def54
Fix bug in `implicit_size_from_params`
ricardoV94 Nov 7, 2024
76c5f8f
fix flaky test, remove high tolerance (#7567)
bwengals Nov 12, 2024
ddd053b
Update pr-auto-label.yml
ricardoV94 Nov 13, 2024
8671a29
Bump PyTensor dependency
ricardoV94 Nov 11, 2024
a160bdd
Include unconditional constant_fold rewrite
ricardoV94 Nov 5, 2024
bbfaf67
Do not mutate Scan inner graph when deriving logprob
ricardoV94 Nov 14, 2024
2eb00c2
Cancel running workflows for updated PRs
Armavica Nov 4, 2024
5637251
Do not rely on model variable ordering for initival replacements
ricardoV94 Nov 11, 2024
528b230
Allow ordering of multi-output OpFromGraph variables in `toposort_rep…
ricardoV94 Nov 11, 2024
67042a8
[pre-commit.ci] pre-commit autoupdate (#7570)
pre-commit-ci[bot] Nov 19, 2024
fc6bbcb
Switch to setup-micromamba action
maresb Nov 20, 2024
7d10b2c
Remove unnecessary BLAS deps from environment-test.yml
maresb Nov 20, 2024
41e4124
Fix error in find_measurable_bitwise
ricardoV94 Nov 25, 2024
348d369
Fix wrong type hint Node should be Apply
ricardoV94 Nov 25, 2024
217450d
Fix metropolis.py type hints
ricardoV94 Nov 25, 2024
741db0f
Explain difference between BinaryMetropolis and BinaryGibbsMetropolis
ricardoV94 Nov 25, 2024
d0b888f
Add example on freeze_data_and_dims
ricardoV94 Nov 27, 2024
f6c6516
Split model transform in API listing
ricardoV94 Nov 27, 2024
f874936
pre-commit ruff 0.8.0 update (#7595)
juanitorduz Nov 28, 2024
1c0a3de
More strict/explicit signature in step samplers
ricardoV94 Nov 25, 2024
a49d69a
Traces are already closed on `finally`
ricardoV94 Nov 23, 2024
09e4ac4
Don't recompile Ndarray function on trace slicing
ricardoV94 Nov 22, 2024
4821f35
Avoid input copy in Ndarray fn
ricardoV94 Nov 22, 2024
c564a7c
Reduce attribute accesses on point record
ricardoV94 Nov 23, 2024
ae9b16e
ValueGradFunction inner function now accepts a raveled input
ricardoV94 Nov 22, 2024
ceb4595
Cache size in DictToArrayBijection
ricardoV94 Nov 22, 2024
36188a4
Optimize ArrayStepShared.step
ricardoV94 Nov 22, 2024
e0fbe65
Optimize NUTS
ricardoV94 Nov 22, 2024
238e463
Avoid recompiling initial_point and logp functions in sample
ricardoV94 Nov 22, 2024
b0460c5
Allow passing compile_kwargs to step inner functions
ricardoV94 Nov 19, 2024
383c033
Register the overloads added by CustomDist in worker processes (#7241)
EliasRas Dec 3, 2024
c45a527
Exponential scale default to 1.0
ricardoV94 Dec 4, 2024
a2ec4e0
Fix pre-commit
ricardoV94 Dec 5, 2024
00d4fc4
[pre-commit.ci] pre-commit autoupdate (#7601)
pre-commit-ci[bot] Dec 5, 2024
724a452
Bump numpy dependency
ricardoV94 Dec 5, 2024
ab704ff
Add warning about changed behavior when passing Sequence for random_seed
ricardoV94 Dec 5, 2024
b100e5d
Deprecate `random_seed=-1` behavior
ricardoV94 Dec 5, 2024
6d16600
Fix test incompatibility with newer PyTensor check
ricardoV94 Dec 5, 2024
8a033cb
Rename `compile_pymc` to `compile`
ricardoV94 Dec 5, 2024
e6ca7e7
Fix error in docstring example for MatrixNormal (#7599)
roesta07 Dec 11, 2024
6aae747
[pre-commit.ci] pre-commit autoupdate (#7609)
pre-commit-ci[bot] Dec 19, 2024
cbccc8d
Remove unused pre-commit workflow
maresb Dec 22, 2024
42f8247
Enable trusted publishing (OIDC) (#7622)
maresb Dec 23, 2024
23acf2e
governance related cleanup (#7541)
OriolAbril Dec 24, 2024
38d9aea
update steering council members
OriolAbril Dec 24, 2024
aa1203b
[pre-commit.ci] pre-commit autoupdate (#7626)
pre-commit-ci[bot] Dec 26, 2024
d953ccd
Probability distributions guide update
fonnesbeck Feb 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/devcontainer-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3.4.0
uses: docker/setup-buildx-action@v3.7.1

- name: Prepare metadata
id: meta
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/dispatched_pre-commit.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
Expand Down
46 changes: 10 additions & 36 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,27 @@ on:
push:
branches: [main]

defaults:
run:
shell: bash -leo pipefail {0}
jobs:
mypy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- name: Cache conda
uses: actions/cache@v4
env:
# Increase this value to reset cache if environment-test.yml has not changed
CACHE_NUMBER: 0
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: mamba-org/setup-micromamba@v2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-py39-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/environment-test.yml') }}
- name: Cache multiple paths
uses: actions/cache@v4
env:
# Increase this value to reset cache if requirements.txt has not changed
CACHE_NUMBER: 0
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{
hashFiles('requirements.txt') }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
mamba-version: "*"
activate-environment: pymc-test
channel-priority: strict
environment-file: conda-envs/environment-test.yml
python-version: "3.10" # Run pre-commit on oldest supported Python version
use-mamba: true
use-only-tar-bz2: false # IMPORTANT: This may break caching of conda packages! See https://github.com/conda-incubator/setup-miniconda/issues/267
create-args: >-
python=3.10
environment-name: pymc-test
init-shell: bash
cache-environment: true
- name: Install-pymc and mypy dependencies
run: |
conda activate pymc-test
pip install -e .
pip install --pre -U polyagamma
python --version
- name: Run mypy
run: |
conda activate pymc-test
python ./scripts/run_mypy.py --verbose
19 changes: 19 additions & 0 deletions .github/workflows/pr-auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
sync:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Sync labels with closing issues
uses: wd60622/[email protected]
with:
exclude: "help wanted,needs info,beginner friendly"
env:
GH_TOKEN: ${{ github.token }}
82 changes: 38 additions & 44 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,49 @@
name: release-pipeline

on:
push:
branches:
- main
release:
types:
- created
- published

jobs:
release-job:
build-package:
runs-on: ubuntu-latest
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_PYMC }}
permissions:
# write attestations and id-token are necessary for attest-build-provenance-github
attestations: write
id-token: write
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
# TODO: ideally, this pipeline should run parallelized tests in upstream jobs..
#- name: Install test tooling
# run: |
# pip install pytest pytest-cov nose nose-parameterized
# pip install -r requirements.txt
#- name: Run tests
# run: |
# pytest --cov=./pymc --cov-report term-missing pymc/
- name: Install release tooling
run: |
pip install build twine
- name: Build package
run: |
python -m build
- name: Check version number match
run: |
echo "GITHUB_REF: ${GITHUB_REF}"
# The GITHUB_REF should be something like "refs/tags/v1.2.3"
# Make sure the package version is the same as the tag
grep -Rq "^Version: ${GITHUB_REF:11}$" pymc.egg-info/PKG-INFO
- name: Publish to PyPI
run: |
twine check dist/*
twine upload --repository pypi --username __token__ --password ${PYPI_TOKEN} dist/*
test-install-job:
needs: release-job
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
- uses: hynek/build-and-inspect-python-package@14c7e53f5d033cfa99f7af916fa59a6f7f356394 # v2.11.0
with:
# Prove that the packages were built in the context of this workflow.
attest-build-provenance-github: true

publish-package:
# Don't publish from forks
if: github.repository_owner == 'pymc-devs' && github.event_name == 'release' && github.event.action == 'published'
# Use the `release` GitHub environment to protect the Trusted Publishing (OIDC)
# workflow by requiring signoff from a maintainer.
environment: release
needs: build-package
runs-on: ubuntu-latest
permissions:
# write id-token is necessary for trusted publishing (OIDC)
id-token: write
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Give PyPI a chance to update the index
run: sleep 240
- name: Install from PyPI
run: |
pip install pymc==${GITHUB_REF:11}
- name: Download Distribution Artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
# The build-and-inspect-python-package action invokes upload-artifact.
# These are the correct arguments from that action.
name: Packages
path: dist
- name: Publish Package to PyPI
uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3
# Implicitly attests that the packages were uploaded in the context of this workflow.
Loading