Skip to content

Commit 970006b

Browse files
committed
Remove floatX="float32" tests
If tests are concerned about float32 they should manually set it with `pytensor.config.change_flags`
1 parent cbc61fd commit 970006b

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [ubuntu-latest]
21-
floatx: [float64]
2221
python-version: ["3.9"]
2322
test-subset:
2423
- pymc_experimental/tests
2524
fail-fast: false
2625
runs-on: ${{ matrix.os }}
2726
env:
2827
TEST_SUBSET: ${{ matrix.test-subset }}
29-
PYTENSOR_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=native'
28+
PYTENSOR_FLAGS: gcc__cxxflags='-march=native'
3029
defaults:
3130
run:
3231
shell: bash -l {0}
@@ -77,21 +76,20 @@ jobs:
7776
uses: codecov/codecov-action@v2
7877
with:
7978
env_vars: TEST_SUBSET
80-
name: ${{ matrix.os }} ${{ matrix.floatx }}
79+
name: ${{ matrix.os }}
8180
fail_ci_if_error: false
8281
windows:
8382
strategy:
8483
matrix:
8584
os: [windows-latest]
86-
floatx: [float32]
8785
python-version: ["3.11"]
8886
test-subset:
8987
- pymc_experimental/tests
9088
fail-fast: false
9189
runs-on: ${{ matrix.os }}
9290
env:
9391
TEST_SUBSET: ${{ matrix.test-subset }}
94-
PYTENSOR_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=core2'
92+
PYTENSOR_FLAGS: gcc__cxxflags='-march=core2'
9593
defaults:
9694
run:
9795
shell: cmd
@@ -144,5 +142,5 @@ jobs:
144142
uses: codecov/codecov-action@v2
145143
with:
146144
env_vars: TEST_SUBSET
147-
name: ${{ matrix.os }} ${{ matrix.floatx }}
145+
name: ${{ matrix.os }}
148146
fail_ci_if_error: false

pymc_experimental/tests/distributions/test_continuous.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
import platform
15-
1614
import numpy as np
1715
import pymc as pm
1816

1917
# general imports
20-
import pytensor
2118
import pytest
2219
import scipy.stats.distributions as sp
2320

@@ -47,10 +44,6 @@ class TestGenExtremeClass:
4744
pm.logp(GenExtreme.dist(mu=0.,sigma=1.,xi=0.5),value=-0.01)
4845
"""
4946

50-
@pytest.mark.xfail(
51-
condition=(pytensor.config.floatX == "float32"),
52-
reason="PyMC underflows earlier than scipy on float32",
53-
)
5447
def test_logp(self):
5548
def ref_logp(value, mu, sigma, xi):
5649
if 1 + xi * (value - mu) / sigma > 0:
@@ -69,13 +62,6 @@ def ref_logp(value, mu, sigma, xi):
6962
ref_logp,
7063
)
7164

72-
if pytensor.config.floatX == "float32":
73-
raise Exception("Flaky test: It passed this time, but XPASS is not allowed.")
74-
75-
@pytest.mark.skipif(
76-
(pytensor.config.floatX == "float32" and platform.system() == "Windows"),
77-
reason="Scipy gives different results on Windows and does not match with desired accuracy",
78-
)
7965
def test_logcdf(self):
8066
def ref_logcdf(value, mu, sigma, xi):
8167
if 1 + xi * (value - mu) / sigma > 0:

pymc_experimental/tests/distributions/test_multivariate.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import numpy as np
22
import pymc as pm
3-
import pytensor
43
import pytest
54

65
import pymc_experimental as pmx
@@ -96,10 +95,6 @@ def phi_args(self, request, phi_args_base):
9695
phi_args_base["importance_concentration"] = 10
9796
return phi_args_base
9897

99-
@pytest.mark.skipif(
100-
pytensor.config.floatX == "float32",
101-
reason="pytensor.config.floatX == 'float32', https://github.com/pymc-devs/pymc/issues/6779",
102-
)
10398
def test_init(
10499
self,
105100
dims,

0 commit comments

Comments
 (0)