# Jax sampling - NameError: name 'auto\_403213' is not defined

**URL:** <https://discourse.pymc.io/t/jax-sampling-nameerror-name-auto-403213-is-not-defined/10313>\
**Category:** v5\
**Created:** [September 5, 2022, 2:00pm UTC](https://discourse.pymc.io/t/jax-sampling-nameerror-name-auto-403213-is-not-defined/10313 "2022-09-05T14:00:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johann\_Hansing](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/johann_hansing/32/4599_2.png) [@Johann\_Hansing](https://discourse.pymc.io/u/Johann_Hansing)\
**Post date:** [September 5, 2022, 2:00pm UTC](https://discourse.pymc.io/t/jax-sampling-nameerror-name-auto-403213-is-not-defined/10313/1 "2022-09-05T14:00:34Z")

</div>

Hey guys, first of all thank you for your amazing work on pymc!

I’ve just migrated a somewhat complex model from pymc3 to pymc.

I tried running fitting the model using the experimental jax sampling via

```auto
import pymc.sampling_jax
with model:
    trace: az.InferenceData = pm.sampling_jax.sample_numpyro_nuts(
        draws=100, tune=100, # to test
        idata_kwargs={"log_likelihood": False}
    )

```

It seems to run as expected for quite a while but throws an exception at the end of sampling:

```auto
[...]
Running chain 3: 100%|██████████| 200/200 [01:52<00:00, 1.78it/s]
Sampling time = 0:01:56.322437
Transforming variables...
Traceback (most recent call last):
[...]
File "/var/folders/sc/xxx/T/tmpp_zzzzz", line 51, in jax_funcified_fgraph
    return i_first_value, [....], age_below_40_mu, first_value_sigma, auto_403375, auto_403356, auto_403337, final_Y_sigma, auto_403213, auto_403236, auto_403259, auto_403282, auto_403305
NameError: name 'auto_403213' is not defined

```

Does anyone have advice for me what may be wrong here and how I could fix it?

I’m not sure what the `auto_N` nodes are for and why they are generated.

---

<div class="post-metadata">

**Author:** ![ricardoV94](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/ricardov94/32/5775_2.png) [@ricardoV94](https://discourse.pymc.io/u/ricardoV94)\
**Post date:** [September 5, 2022, 5:16pm UTC](https://discourse.pymc.io/t/jax-sampling-nameerror-name-auto-403213-is-not-defined/10313/2 "2022-09-05T17:16:33Z")

</div>

Those are just dummy names used when creating the JAX functions. I am afraid you will have to share more details from your model to be able to help. Ideally a small reproducible example.

---

<div class="post-metadata">

**Author:** ![Johann\_Hansing](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/johann_hansing/32/4599_2.png) [@Johann\_Hansing](https://discourse.pymc.io/u/Johann_Hansing)\
**Post date:** [September 6, 2022, 2:11pm UTC](https://discourse.pymc.io/t/jax-sampling-nameerror-name-auto-403213-is-not-defined/10313/3 "2022-09-06T14:11:25Z")

</div>

Thank you for taking your time to look at my question and to reply @ricardoV94

I can use the standard `sample` method (I guess that’s always NUTS) without issues.

I’ll see if I can create a small(ish) reproducible example
