Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/client-R-git-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
-
name: APT Dependencies
run: |
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y r-base libcurl4-gnutls-dev libxml2-dev libfontconfig1-dev libfreetype6 libharfbuzz-dev libfribidi-dev libtiff-dev libssl-dev
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y r-base libcurl4-gnutls-dev libxml2-dev libfontconfig1-dev libfreetype6 libharfbuzz-dev libfribidi-dev libtiff-dev libssl-dev libgit2-dev pkg-config libuv1-dev
-
name: R Dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/client-python-pymc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y python3-pip python3-venv
python3 -m venv venv
. venv/bin/activate
pip3 install numpy arviz pymc umbridge
pip3 install numpy arviz pymc umbridge matplotlib
-
name: Build and run
run: |
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/client-python-tinyDA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ jobs:
-
name: Dependencies
run: |
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y python3-pip python3-venv
python3 -m venv venv
# Pinned to Python 3.12: tinyDA pins arviz<0.19, whose use of the
# matplotlib.style.core internal API only works with old matplotlib
# versions
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y software-properties-common
add-apt-repository -y ppa:deadsnakes/ppa
apt update && DEBIAN_FRONTEND="noninteractive" apt install -y python3.12 python3.12-venv
python3.12 -m venv venv
. venv/bin/activate
pip3 install papermill umbridge tinyDA ipykernel ray
pip3 install papermill umbridge tinyDA ipykernel ray "matplotlib<3.9"
-
name: Build and run
run: |
Expand Down
4 changes: 3 additions & 1 deletion clients/python/pymc-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
with pm.Model() as model:
# UM-Bridge models with a single 1D output implementing a PDF
# may be used as a PyMC density that in turn may be sampled
posterior = pm.DensityDist('posterior',logp=op,shape=input_dim)
def umbridge_logp(value):
return op(value)
posterior = pm.CustomDist('posterior', logp=umbridge_logp, shape=input_dim)

map_estimate = pm.find_MAP()
print(f"MAP estimate of posterior is {map_estimate['posterior']}")
Expand Down
Loading