# Problem with sample\_posterior\_predictive() for Gaussian Process

**URL:** <https://discourse.pymc.io/t/problem-with-sample-posterior-predictive-for-gaussian-process/8743>\
**Category:** Questions\
**Created:** [February 7, 2022, 10:33am UTC](https://discourse.pymc.io/t/problem-with-sample-posterior-predictive-for-gaussian-process/8743 "2022-02-07T10:33:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurav\_Rukhaiyar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/saurav_rukhaiyar/32/4774_2.png) [@Saurav\_Rukhaiyar](https://discourse.pymc.io/u/Saurav_Rukhaiyar)\
**Post date:** [February 7, 2022, 10:33am UTC](https://discourse.pymc.io/t/problem-with-sample-posterior-predictive-for-gaussian-process/8743/1 "2022-02-07T10:33:36Z")

</div>

while using pm.sample\_posterior\_predictive() for GP tuning, I am getting following error:  
sample\_posterior\_predictive() got an unexpected keyword argument ‘vars’.

Kindly help

Saurav

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pymc3/original/2X/b/b63bc71b5235e5da16db03c6583543fb7bd306be.png)

---

<div class="post-metadata">

**Author:** ![OriolAbril](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/oriolabril/32/2497_2.png) [@OriolAbril](https://discourse.pymc.io/u/OriolAbril)\
**Post date:** [February 7, 2022, 3:24pm UTC](https://discourse.pymc.io/t/problem-with-sample-posterior-predictive-for-gaussian-process/8743/2 "2022-02-07T15:24:16Z")

</div>

`vars` was deprecated quite a while ago, and removed a couple releases back. You have to use `var_names` which takes strings that should match the names assigned to pymc distributions: [Inference — PyMC3 3.11.4 documentation](https://docs.pymc.io/en/v3/api/inference.html#pymc3.sampling.sample_posterior_predictive)
