Operating System: Windows 10
Python Version: 3.6.1
Interface Version: 2.16.0.0
Compiler/Toolkit: MinGW
Dear All,
I have encountered a very mysterious runtime error trying to compile a simple model. My code is the following:
…SOME FUNCTION
fits = []
for i, model_code in enumerate(model_codes):
sm = StanModel_cache(model_code=model_code)
fits.append(sm.sampling(data=data,chains=2))
return fits
Where StanModel_cache is the example cache function from the docs. The error is not related to the pickling, since I tried to compile a model normally and still ended up the getting this:
multiprocessing.pool.RemoteTraceback: **
"""
Traceback (most recent call last):
** File “C:\Users\Lenovo 500\AppData\Local\Programs\Python\Python36\lib\multiprocessing\pool.py”, line 119, in worker
** result = (True, func(args, kwds))
** File “C:\Users\Lenovo 500\AppData\Local\Programs\Python\Python36\lib\multiprocessing\pool.py”, line 44, in mapstar*
** return list(map(args))*
** File “stanfit4anon_model_6fabfab1b05cee6c931433fbe37f8071_5647248379771553170.pyx”, line 368, in stanfit4anon_model_6fabfab1b05cee6c931433fbe37f8071_5647248379771553170._call_sampler_star (C:\Users\LENOVO~1\AppData\Local\Temp\tmp670pr_y1\stanfit4anon_model_6fabfab1b05cee6c931433fbe37f8071_5647248379771553170.cpp:8334)**
** File “stanfit4anon_model_6fabfab1b05cee6c931433fbe37f8071_5647248379771553170.pyx”, line 401, in stanfit4anon_model_6fabfab1b05cee6c931433fbe37f8071_5647248379771553170._call_sampler (C:\Users\LENOVO~1\AppData\Local\Temp\tmp670pr_y1\stanfit4anon_model_6fabfab1b05cee6c931433fbe37f8071_5647248379771553170.cpp:8986)**
RuntimeError: Exception: Don’t do this (in ‘unkown file name’ at line 23)
“”"
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
** File “C:/Users/Lenovo 500/Desktop/Projects/Machine Learning with Python/supervised_learning.py”, line 116, in **
** fit = sample(model_codes, data)**
** File “C:/Users/Lenovo 500/Desktop/Projects/Machine Learning with Python/supervised_learning.py”, line 95, in sample**
** fits.append(sm.sampling(data=data,chains=2))**
** File “C:\Users\Lenovo 500\AppData\Local\Programs\Python\Python36\lib\site-packages\pystan\model.py”, line 725, in sampling**
** ret_and_samples = _map_parallel(call_sampler_star, call_sampler_args, n_jobs)**
** File “C:\Users\Lenovo 500\AppData\Local\Programs\Python\Python36\lib\site-packages\pystan\model.py”, line 81, in _map_parallel**
** map_result = pool.map(function, args)**
** File “C:\Users\Lenovo 500\AppData\Local\Programs\Python\Python36\lib\multiprocessing\pool.py”, line 260, in map**
** return self._map_async(func, iterable, mapstar, chunksize).get()**
** File “C:\Users\Lenovo 500\AppData\Local\Programs\Python\Python36\lib\multiprocessing\pool.py”, line 608, in get**
** raise self._value**
RuntimeError: Exception: Don’t do this (in ‘unkown file name’ at line 23)
Any help would be very appreciated.
Thank You in advance!
Stefan