-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpytest.ini
More file actions
56 lines (56 loc) · 3.19 KB
/
Copy pathpytest.ini
File metadata and controls
56 lines (56 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[pytest]
# Pytest configuration for EROTICA
minversion = 8.0
addopts =
-ra
--strict-markers
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
integration: marks tests as integration tests
unit: marks tests as unit tests
plotting: marks tests that generate plots
filterwarnings =
ignore::UserWarning
ignore::DeprecationWarning
ignore::FutureWarning
# RuntimeWarning is an ERROR here, not noise. In a numerics package
# "divide by zero", "invalid value in sqrt" and "overflow" are how a silent
# NaN enters a published number. This was a blanket `ignore::RuntimeWarning`
# until 2026-07-27; auditing it showed every occurrence came from PyTensor's
# own graph rewriter, not from erotica -- so nothing of ours was being
# hidden, and nothing of ours may be hidden from now on.
error::RuntimeWarning
# Third-party, unfixable from here: constant folding inside PyTensor's own
# rewriter arithmetic (mul_calculate) divides by zero while simplifying a
# graph. Scoped narrowly rather than ignored wholesale. NOTE: an earlier
# version of this comment claimed "the rewritten graph is never the one that
# runs" -- that is false, rewritten graphs are exactly what run. What is
# actually checked is that the isochrone models recover injected truth; the
# affected models use no Cauchy and so are unrelated to the numba CauchyRV
# bug documented in tools/validation/pytensor_cauchy_bug_report.md.
# NUTS's kinetic-energy overflow IS its divergence detector, not a silent NaN, so the
# policy above does not apply to it. Traced through the source rather than assumed:
# integration.py computes `kinetic = pot.velocity_energy(p_new, v_new)`, which is
# `0.5 * np.dot(x, v_out)` in quadpotential.py. A momentum blow-up overflows that dot to
# +inf, so `energy_change = right.energy - self.start_energy` is inf, the guard
# `if energy_change < self.Emax` fails, and nuts.py returns a DivergenceInfo. The
# trajectory is REJECTED and the value never reaches the posterior.
#
# Surfaced 2026-08-04, when CI resolved pytensor 3.2.4 + numba 0.66 + jax 0.11 + pymc
# 6.2 -- a stack the working environment does not have -- and four test_inference tests
# began erroring. Escalating it ABORTS sampling at the first divergence, which is
# strictly worse than letting NUTS do its job: it hides the divergence COUNT behind a
# crash, so you cannot tell one benign divergence from a broken geometry.
#
# The gate is not removed, it is moved to where it belongs: every affected test asserts
# zero divergent transitions on its own trace. A real problem still fails, with a number
# instead of a warning.
ignore:overflow encountered in dot:RuntimeWarning:pymc.step_methods.hmc.quadpotential
ignore:overflow encountered in dot:RuntimeWarning:pymc.step_methods.hmc.nuts
ignore:divide by zero encountered:RuntimeWarning:pytensor.tensor.rewriting.math
ignore:overflow encountered:RuntimeWarning:pytensor.tensor.rewriting.math
ignore:invalid value encountered:RuntimeWarning:pytensor.tensor.rewriting.math