Hi Samuel,
Sorry, I was a bit unclear here.
I just learned how to use the computer cluster with my Python code. I split up the sampling procedure into 11 chains. When I looked at the results, all chains had produced identical traces. I therefore wanted to use a different seed for each chain; for instance the number ID of the chain to get different traces each time and still keep it reproducible.
I tried locally if I was able to set the random seed. So I set the seed once ("pymc.numpy.random.seed(1)", "np.random.seed(1)", or "random.seed(1)"), ran a model, set the seed again, ran a new model again, but obtained different results. (I think this caused your confusion: originally, my problem was that the chains were all identical - now, I wanted the models to yield identical results to check that I understood how to set the seed.)
That the results were different is unexpected because Thomas actually says (
https://groups.google.com/forum/#!topic/pymc/av1DDMfUolU ) that it would be possible to do this with numpy.random.seed. I also found this example here, which works fine for me (
http://nbviewer.jupyter.org/gist/aflaxman/e0d61076595251e26199 ).
I was thinking that my command was not showing any effect in the environment where the HDDM sampling actually happens. So I played around a bit with the "sample" method in hierarchical.py and added something like this to line 650:
# Seed the random number generator
randseed = kwargs.pop('randseed', None)
if randseed != None:
# pm.numpy.random.seed(randseed)
np.random.seed(randseed)
(I'm still quite new to Python.) But I was hoping that this would be the environment where my command should have an effect.
Thanks & best,
Michael