docker run -it -p 4243:4243 linusseelinger/benchmark-analytic-gaussian-mixture
python3 umbridge/clients/python pymc-client.py http://localhost:4243
http://localhost:4243
Connecting to host URL http://localhost:4243
Model output: [-48.17723351]
Check model's gradient against numerical gradient. This requires an UM-Bridge model with gradient support.
|----------------------------------------------------------| 0.02% [1/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.04% [2/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.06% [3/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.08% [4/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.10% [5/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.12% [6/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.14% [7/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.16% [8/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |███████████████████████████████████████████████████████| 100.00% [8/8 00:00<00:00 logp = -3.7296, ||grad|| = 0.025167]
MAP estimate of posterior is [-1.99936594 1.99936594]
Only 50 samples in chain.
Auto-assigning NUTS sampler...
Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [posterior]
Connecting to host URL http://localhost:4243
Model output: [-48.17723351]
Check model's gradient against numerical gradient. This requires an UM-Bridge model with gradient support.
|----------------------------------------------------------| 0.02% [1/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.04% [2/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.06% [3/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.08% [4/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.10% [5/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.12% [6/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.14% [7/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |----------------------------------------------------------| 0.16% [8/5000 00:00<? logp = -3.7296, ||grad|| = 0.025167] |███████████████████████████████████████████████████████| 100.00% [8/8 00:00<00:00 logp = -3.7296, ||grad|| = 0.025167]
MAP estimate of posterior is [-1.99936594 1.99936594]
Only 50 samples in chain.
Auto-assigning NUTS sampler...
Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [posterior]
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\multiprocessing\spawn.py", line 125, in _main
prepare(preparation_data)
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\multiprocessing\spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\runpy.py", line 265, in run_path
return _run_module_code(code, init_globals, run_name,
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\katherinero\Documents\code\umbridge\clients\python\pymc-client.py", line 40, in <module>
inferencedata = pm.sample(draws=50)
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\site-packages\pymc\sampling.py", line 617, in sample
mtrace = _mp_sample(**sample_args, **parallel_args)
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\site-packages\pymc\sampling.py", line 1508, in _mp_sample
sampler = ps.ParallelSampler(
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\site-packages\pymc\parallel_sampling.py", line 412, in __init__
self._samplers = [
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\site-packages\pymc\parallel_sampling.py", line 413, in <listcomp>
ProcessAdapter(
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\site-packages\pymc\parallel_sampling.py", line 272, in __init__
self._process.start()
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\multiprocessing\popen_spawn_win32.py", line 45, in __init__
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\multiprocessing\spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "C:\Users\katherinero\Documents\code\umbridge\env\lib\multiprocessing\spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.