Skip to content

Commit 5def470

Browse files
authored
update to use _moments (#34)
* update to use _moments * update pymc * update conda-envs * pip install * pip install * pip install * dll error * dll error * dll error * dll error
1 parent cd97fb6 commit 5def470

File tree

8 files changed

+25
-22
lines changed

8 files changed

+25
-22
lines changed

.github/workflows/test.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ jobs:
9393
- name: Cache conda
9494
uses: actions/cache@v1
9595
env:
96-
# Increase this value to reset cache if conda-envs/environment-test-py39.yml has not changed
96+
# Increase this value to reset cache if conda-envs/environment-test-py37.yml has not changed
9797
CACHE_NUMBER: 0
9898
with:
9999
path: ~/conda_pkgs_dir
100100
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
101-
hashFiles('conda-envs/windows-environment-test-py39.yml') }}
101+
hashFiles('conda-envs/windows-environment-test-py37.yml') }}
102102
- name: Cache multiple paths
103103
uses: actions/cache@v2
104104
env:
@@ -116,21 +116,21 @@ jobs:
116116
miniforge-variant: Mambaforge
117117
miniforge-version: latest
118118
mamba-version: "*"
119-
activate-environment: pymc-test-py39
119+
activate-environment: pymc-test-py37
120120
channel-priority: strict
121-
environment-file: conda-envs/windows-environment-test-py39.yml
121+
environment-file: conda-envs/windows-environment-test-py37.yml
122122
use-mamba: true
123123
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
124124
- name: Install-pymc
125125
run: |
126-
conda activate pymc-test-py39
126+
conda activate pymc-test-py37
127127
pip install -e .
128128
python --version
129129
- name: Run tests
130130
# This job uses a cmd shell, therefore the environment variable syntax is different!
131131
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
132132
run: >-
133-
conda activate pymc-test-py39 &&
133+
conda activate pymc-test-py37 &&
134134
python -m pytest -vv --cov=pymc_experimental --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
135135
- name: Upload coverage to Codecov
136136
uses: codecov/codecov-action@v2

conda-envs/environment-test-py38.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- pymc>=4.0.0b1
76
- pip
87
- pytest-cov>=2.5
98
- pytest>=3.0
109
- python=3.8
10+
- pip:
11+
- "git+https://github.com/pymc-devs/pymc.git@main"

conda-envs/environment-test-py39.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- pymc>=4.0.0b3
76
- pip
87
- pytest-cov>=2.5
98
- pytest>=3.0
109
- python=3.9
10+
- pip:
11+
- "git+https://github.com/pymc-devs/pymc.git@main"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: pymc-test-py37
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- pip
7+
- pytest-cov>=2.5
8+
- pytest>=3.0
9+
- python=3.7
10+
- pip:
11+
- "git+https://github.com/pymc-devs/pymc.git@main"

conda-envs/windows-environment-test-py39.yml

-10
This file was deleted.

pymc_experimental/bart/bart.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from aesara.tensor.random.op import RandomVariable, default_supp_shape_from_params
2020
from pandas import DataFrame, Series
2121

22-
from pymc.distributions.distribution import NoDistribution, _get_moment
22+
from pymc.distributions.distribution import NoDistribution, _moment
2323

2424
__all__ = ["BART"]
2525

@@ -109,7 +109,7 @@ def __new__(
109109

110110
NoDistribution.register(BARTRV)
111111

112-
@_get_moment.register(BARTRV)
112+
@_moment.register(BARTRV)
113113
def get_moment(rv, size, *rv_inputs):
114114
return cls.get_moment(rv, size, *rv_inputs)
115115

pymc_experimental/bart/pgbart.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(
6464
model=None,
6565
):
6666
model = modelcontext(model)
67-
initial_values = model.compute_initial_point()
67+
initial_values = model.initial_point()
6868
if vars is None:
6969
vars = model.value_vars
7070
else:

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pymc>=4.0.0b4
1+
pymc>=4.0.0b6

0 commit comments

Comments
 (0)