diff --git a/pyproject.toml b/pyproject.toml index 48926d3b..61e0afe0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ keywords = ["HSSM", "sequential sampling models", "bayesian", "bayes", "mcmc"] [tool.poetry.dependencies] python = ">=3.10,<3.12" -pymc = "^5.14.0" +pymc = ">=5.14.0,<5.15.0" arviz = "^0.18.0" onnx = "^1.16.0" ssm-simulators = "^0.7.2" diff --git a/src/hssm/hssm.py b/src/hssm/hssm.py index 5f23f572..e896bb8f 100644 --- a/src/hssm/hssm.py +++ b/src/hssm/hssm.py @@ -565,7 +565,11 @@ def sample( if self._inference_obj is None: self._inference_obj = idata elif isinstance(self._inference_obj, az.InferenceData): - self._inference_obj.extend(idata) + _logger.info( + "Inference data already exsits. \n" + "Data from this run will overwrite the idata file..." + ) + self._inference_obj.extend(idata, join="right") else: raise ValueError( "The model has an attached inference object under" @@ -590,7 +594,11 @@ def sample( # drop redundant 'rt,response_mean' variable, # if parent already in posterior del self._inference_obj.posterior["rt,response_mean"] - return self.traces + + # returning copy of traces here to detach from the actual _inference_obj + # attached to the class. Otherise resampling will + # overwrite the 'returned' object leading to unexpected consequences + return deepcopy(self.traces) def sample_posterior_predictive( self,