From 60e537cc45a8ce2884ff9848cbbc26ee970b459f Mon Sep 17 00:00:00 2001 From: Pablo Vena Date: Mon, 12 Feb 2024 17:58:39 -0500 Subject: [PATCH] remove deprecated property --- causalpy/pymc_models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/causalpy/pymc_models.py b/causalpy/pymc_models.py index 7c9292bc..4c29a68b 100644 --- a/causalpy/pymc_models.py +++ b/causalpy/pymc_models.py @@ -89,7 +89,7 @@ def _data_setter(self, X) -> None: This method is used internally to register new data for the model for prediction. """ - with self.model: + with self: pm.set_data({"X": X}) def fit(self, X, y, coords: Optional[Dict[str, Any]] = None) -> None: @@ -105,7 +105,7 @@ def fit(self, X, y, coords: Optional[Dict[str, Any]] = None) -> None: random_seed = None self.build_model(X, y, coords) - with self.model: + with self: self.idata = pm.sample(**self.sample_kwargs) self.idata.extend(pm.sample_prior_predictive(random_seed=random_seed)) self.idata.extend( @@ -125,7 +125,7 @@ def predict(self, X): """ self._data_setter(X) - with self.model: # sample with new input data + with self: # sample with new input data post_pred = pm.sample_posterior_predictive( self.idata, var_names=["y_hat", "mu"], progressbar=False ) @@ -354,7 +354,7 @@ def fit(self, X, Z, y, t, coords, priors): distributions. """ self.build_model(X, Z, y, t, coords, priors) - with self.model: + with self: self.idata = pm.sample(**self.sample_kwargs) self.idata.extend(pm.sample_prior_predictive()) self.idata.extend(