Skip to content

Commit

Permalink
Uncomment pytensor.config.compute_test_value = "raise" (#94)
Browse files Browse the repository at this point in the history
* Uncomment `pytensor.config.compute_test_value = "raise"` now that PyMC 5.9.2 is released with fix

* Update PyMC lower bound to include `compute_test_value` fix (>=5.9.2)

* Add pymc_mamba session that creates env with mamba but installs with pip

For troubleshooting purposes. Will try installing with mamba after.

* Revert mamba environment in Github workflow: program not found

* using mamba

* install mamba too

---------

Co-authored-by: Dan F-M <foreman.mackey@gmail.com>
  • Loading branch information
vandalt and dfm authored Nov 20, 2023
1 parent 7feb2e3 commit 863c472
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 19 deletions.
37 changes: 33 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
- "core"
- "jax"
- "pymc3"
- "pymc"
# - "pymc"
- "pymc_jax"

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -60,12 +60,41 @@ jobs:
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: ${{matrix.os}}-${{matrix.session}}-${{matrix.python-version}}


tests-pymc:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Setup conda
uses: mamba-org/setup-micromamba@v1
with:
environment-name: test-env
create-args: >-
mamba
python=3.10
- name: Install nox
run: python -m pip install -U nox

- name: Run tests
run: |
python -m nox --non-interactive --error-on-missing-interpreter \
--session pymc_mamba-3.10
coverage:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Finish coverage collection
Expand Down
7 changes: 7 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ def pymc(session):
_session_run(session, "python/test/pymc")


@nox.session(python=ALL_PYTHON_VS, venv_backend="mamba")
def pymc_mamba(session):
session.conda_install("pymc", channel="conda-forge")
session.install(".[test,pymc]")
_session_run(session, "python/test/pymc")


@nox.session(python=ALL_PYTHON_VS)
def pymc_jax(session):
session.install(".[test,jax,pymc]")
Expand Down
14 changes: 0 additions & 14 deletions python/test/pymc/conftest.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"celerite>=0.3.1",
],
"pymc3": ["pymc3>=3.9", "numpy<1.22", "xarray<2023.10.0"],
"pymc": ["pymc>=5"],
"pymc": ["pymc>=5.9.2"],
"jax": ["jax", "jaxlib"],
"docs": [
"sphinx",
Expand Down

0 comments on commit 863c472

Please sign in to comment.