Skip to content

Commit 18a6777

Browse files
committed
Move warning filter to code from test
1 parent d040e57 commit 18a6777

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pymc_extras/inference/pathfinder/pathfinder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ def bfgs_sample_dense(
485485
shapes: L=batch_size, N=num_params, J=history_size, M=num_samples
486486
"""
487487

488+
_warnings.simplefilter("ignore", category=FutureWarning)
488489
N = x.shape[-1]
489490
IdN = pt.eye(N)[None, ...]
490491

@@ -560,6 +561,7 @@ def bfgs_sample_sparse(
560561
shapes: L=batch_size, N=num_params, J=history_size, M=num_samples
561562
"""
562563

564+
_warnings.simplefilter("ignore", category=FutureWarning)
563565
# qr_input: (L, N, 2J)
564566
qr_input = inv_sqrt_alpha_diag @ beta
565567
(Q, R), _ = pytensor.scan(fn=pt.nlinalg.qr, sequences=[qr_input], allow_gc=False)

tests/test_pathfinder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
pytestmark = pytest.mark.filterwarnings(
2222
"ignore:compile_pymc was renamed to compile:FutureWarning",
23-
"ignore:batched_dot is deprecated:FutureWarning",
2423
)
2524

2625
import pymc_extras as pmx

0 commit comments

Comments
 (0)