I used the latex form in the varnames for the convenience of plotting.
Such as
mumu = pm.Uniform( r'$\rm\it\mu_\mu$', 0, 3)
I want to save the trace for later plotting.
The varnames before saving is
trace_h[0]:
{'$\\rm\\it\\mu_\\mu$_interval__': 1.486670432765974,
'$\\rm\\it\\sigma_\\mu$_interval__': -1.2848523685113782,
'$\\rm\\it\\sigma_c$_interval__': -0.45050137041548416,
After saving and loading :
pm.save_trace(trace_h, directory='Inter2', overwrite=True)
trace_h2=pm.load_trace( directory='Inter2', model=model_h)
The varnames became
trace_h2[0]:
{'$/rm/it/mu_/mu$_interval__': 1.486670432765974,
'$/rm/it/sigma_/mu$_interval__': -1.2848523685113782,
'$/rm/it/sigma_c$_interval__': -0.45050137041548416,
How can I save the trace without changing the backslash in the varnames and plot it by pm.traceplot() later