Skip to content

Commit 39a0111

Browse files
ArmavicaricardoV94
authored andcommitted
Distribute test_posteriors into step_methods
1 parent a3cb2e2 commit 39a0111

File tree

4 files changed

+51
-21
lines changed

4 files changed

+51
-21
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
- pymc/tests/test_variational_inference.py pymc/tests/test_initial_point.py
151151
- pymc/tests/test_model.py pymc/tests/test_step.py
152152
- pymc/tests/gp/test_cov.py pymc/tests/gp/test_gp.py pymc/tests/gp/test_mean.py pymc/tests/gp/test_util.py pymc/tests/ode/test_ode.py pymc/tests/ode/test_utils.py pymc/tests/test_smc.py pymc/tests/test_parallel_sampling.py
153-
- pymc/tests/test_sampling.py pymc/tests/test_posteriors.py
153+
- pymc/tests/test_sampling.py pymc/tests/step_methods/test_metropolis.py pymc/tests/step_methods/test_slicer.py pymc/tests/step_methods/hmc/test_nuts.py
154154

155155
fail-fast: false
156156
runs-on: ${{ matrix.os }}

pymc/tests/test_posteriors.py renamed to pymc/tests/step_methods/hmc/test_nuts.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,6 @@ class TestNUTSUniform(sf.NutsFixture, sf.UniformFixture):
2727
atol = 0.05
2828

2929

30-
class TestMetropolisUniform(sf.MetropolisFixture, sf.UniformFixture):
31-
n_samples = 50000
32-
tune = 10000
33-
burn = 0
34-
chains = 4
35-
min_n_eff = 10000
36-
rtol = 0.1
37-
atol = 0.05
38-
39-
40-
class TestSliceUniform(sf.SliceFixture, sf.UniformFixture):
41-
n_samples = 10000
42-
tune = 1000
43-
burn = 0
44-
chains = 4
45-
min_n_eff = 5000
46-
rtol = 0.1
47-
atol = 0.05
48-
49-
5030
class TestNUTSUniform2(TestNUTSUniform):
5131
step_args = {"target_accept": 0.95}
5232

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2020 The PyMC Developers
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from pymc.tests import sampler_fixtures as sf
16+
17+
18+
class TestMetropolisUniform(sf.MetropolisFixture, sf.UniformFixture):
19+
n_samples = 50000
20+
tune = 10000
21+
burn = 0
22+
chains = 4
23+
min_n_eff = 10000
24+
rtol = 0.1
25+
atol = 0.05
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2020 The PyMC Developers
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from pymc.tests import sampler_fixtures as sf
16+
17+
18+
class TestSliceUniform(sf.SliceFixture, sf.UniformFixture):
19+
n_samples = 10000
20+
tune = 1000
21+
burn = 0
22+
chains = 4
23+
min_n_eff = 5000
24+
rtol = 0.1
25+
atol = 0.05

0 commit comments

Comments
 (0)