Skip to content

Commit 59c58ea

Browse files
committed
get new models to issue warnings that they are experimental
1 parent 91b2874 commit 59c58ea

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

causalpy/pymc_models.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414
"""Custom PyMC models for causal inference"""
1515

16+
import warnings
1617
from typing import Any, Dict, List, Optional
1718

1819
import arviz as az
@@ -1103,6 +1104,15 @@ def __init__(
11031104
):
11041105
super().__init__(sample_kwargs=sample_kwargs)
11051106

1107+
# Warn that this is experimental
1108+
warnings.warn(
1109+
"BayesianBasisExpansionTimeSeries is experimental and its API may change in future versions. "
1110+
"It uses a different data format (numpy arrays and datetime indices) compared to other PyMC models. "
1111+
"Not recommended for production use.",
1112+
FutureWarning,
1113+
stacklevel=2,
1114+
)
1115+
11061116
# Store original configuration parameters
11071117
self.n_order = n_order
11081118
self.n_changepoints_trend = n_changepoints_trend
@@ -1613,6 +1623,17 @@ def __init__(
16131623
mode: str = "JAX",
16141624
):
16151625
super().__init__(sample_kwargs=sample_kwargs)
1626+
1627+
# Warn that this is experimental
1628+
warnings.warn(
1629+
"StateSpaceTimeSeries is experimental and its API may change in future versions. "
1630+
"It uses a different data format (numpy arrays and datetime indices) compared to other PyMC models, "
1631+
"and returns xr.Dataset instead of az.InferenceData from predict(). "
1632+
"Not recommended for production use.",
1633+
FutureWarning,
1634+
stacklevel=2,
1635+
)
1636+
16161637
self._custom_trend_component = trend_component
16171638
self._custom_seasonality_component = seasonality_component
16181639
self.level_order = level_order

0 commit comments

Comments
 (0)