Skip to content

Commit 640366e

Browse files
added WIP warning to pmx.fit
1 parent 6f89b16 commit 640366e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

pymc_extras/inference/inla.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import warnings
2+
13
import arviz as az
24
import numpy as np
35
import pymc as pm
@@ -146,6 +148,8 @@ def fit_INLA(
146148
return_latent_posteriors: bool = True,
147149
**sampler_kwargs,
148150
) -> az.InferenceData:
151+
warnings.warn("Currently only valid for a nested normal model. WIP.", UserWarning)
152+
149153
model = pm.modelcontext(model)
150154

151155
# Check if latent field is Gaussian

tests/test_inla.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def rng():
2626
return np.random.default_rng(seed)
2727

2828

29+
@pytest.mark.filterwarnings("ignore:Currently only valid for a nested normal model. WIP.")
2930
def test_non_gaussian_latent(rng):
3031
"""
3132
INLA should raise an error if trying to use a non-Gaussian latent
@@ -45,6 +46,7 @@ def test_non_gaussian_latent(rng):
4546
pmx.fit(method="INLA", x=x)
4647

4748

49+
@pytest.mark.filterwarnings("ignore:Currently only valid for a nested normal model. WIP.")
4850
def test_non_precision_MvNormal(rng):
4951
"""
5052
INLA should raise an error if trying to use a latent not in precision form
@@ -67,6 +69,7 @@ def test_non_precision_MvNormal(rng):
6769
pmx.fit(method="INLA", x=x)
6870

6971

72+
@pytest.mark.filterwarnings("ignore:Currently only valid for a nested normal model. WIP.")
7073
def test_3_layer_normal(rng):
7174
"""
7275
Test INLA against a simple toy problem:

0 commit comments

Comments
 (0)