Hello PyMC community.

May I please get your advice on how the script below can be modified to include *keyvalue* in the trace? *keyvalue* is not a prior nor a likelihood - it is just a prediction value I would like to track.

`def my_blackbox(m, c): likelihood, keyvalue = run_my_external_program(m, c) return likelihood class my_tt(tt.Op): itypes = [tt.dvector] otypes = [tt.dscalar] def __init__(self, likelihood): self.likelihood = likelihood def perform(self, node, inputs, outputs): theta, = inputs m, c = theta outputs[0][0] = np.array(self.likelihood(m, c)) def like_fun(v): return like_tt(v) global like_tt like_tt = my_tt(my_blackbox) with pm.Model(): m = pm.Normal('m', mu = 0, sigma = 1) c = pm.Normal('c', mu = 0, sigma = 1) params = tt.as_tensor_variable([m, c]) pm.DensityDist('likelihood', like_tt, observed = {'v':params}) trace = pm.sample(500)`

Many thanks in advance.