# Using text backend raises sampler stats error

**URL:** <https://discourse.pymc.io/t/using-text-backend-raises-sampler-stats-error/165>\
**Category:** Questions\
**Created:** [July 16, 2017, 5:42pm UTC](https://discourse.pymc.io/t/using-text-backend-raises-sampler-stats-error/165 "2017-07-16T17:42:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [July 17, 2017, 6:15am UTC](https://discourse.pymc.io/t/using-text-backend-raises-sampler-stats-error/165/2 "2017-07-17T06:15:09Z")

</div>

Yep, text backend does not support sampler stats. You can try pickle the trace

> [@Get nan or inf from model.logp (model.test point) is an attestation of incorrectly configured model?](https://discourse.pymc.io/t/get-nan-or-inf-from-model-logp-model-test-point-is-an-attestation-of-incorrectly-configured-model/111/22):
>
> Haven’t tried this, but it should work (give it a shot with very few samples first!): import cPickle as pickle # if python2 import pickle # if python3 ... trace = pm.sample(5e4, njobs=4, step=[pm.Metropolis(vars=[Y, Yp]), pm.NUTS()], tune=1000) with open('trace.pkl', 'wb') as buff: pickle.dump(trace, buff) You can then recover the trace with with open('trace.pkl', 'rb') as buff: trace = pickle.load(buff) This is great for local development on your computer. A few “gotchas” that p…

---

_[View the full topic](https://discourse.pymc.io/t/using-text-backend-raises-sampler-stats-error/165)._
