Here is something so embedded in stan, I can’t begin to debug. I have ep-stan code running just fine, but when I attempt to parallelize it by dishing out worker code to worker nodes, I get a strange error
File “/usr/local/lib64/python2.7/site-packages/pystan/model.py”, line 666, in sampling
fit = self.fit_class(data)
File “stanfit4SimpleAdAttribEP_sg_f3b10500566451c7863bb6c6a0d1260c_7800964287842110052.pyx”, line 463, in stanfit4SimpleAdAttribEP_sg_f3b10500566451c7863bb6c6a0d1260c_7800964287842110052.StanFit4Model.init
TypeError: init() takes exactly 2 positional arguments (1 given)
This .pyx file seems to be a temporary file, so I can’t open it to exam, and I don’t know at which stage it get generated, therefore, no clue why there is this signature mismatch.
The code would be a handful. let’s please talk this thru. The parallelization is pyspark. as far as pickling, the unpickling is done in the master only and passed to the workers.
sm = cPickle.load(zf.open(filename+'.pkl'))
This code and env is first tested in serial mode and works completely before parallelization. Of course a serrialization of the model object has to take place during the passing, but spark takes care of that. What do you think?
The underscores are significant and different between the title and the traceback you cite. Your error smells like an unbound method call, maybe double check use of pyspark.
edit nevermind I see markdown bold init which means it is double underscored. Definitely an unbound method call.