How to track the number of a chain used in the model simulations?

Hello all,

Just a small technical question and a bit wondering: can I access the number of a chain currently used in a simulation?

Thank you in advance

Not sure what you meant but you are looking for either len(trace) or trace.nchains

Thank you for leaving a message. I had in my mind something like that: I want to do find_MAP depending on some parameter, and in order to make it faster, I could run it in parallel instead of a simple for-loop. For example, the number of a chain could be used as the input for that parameter.

Alternatively, this could be running MCMC simulations where the chain number defines the parameter value.

But probably, I think in a bit over-complicated sense and running for-loop could be a good solution