dynesty: Cannot compute a bounding ellipsoid to a single point if `pointvol` is not specified
Hi, I encountered this error when using DynamicNestedSampler with hslice and my own function of grad_u. This error shows up immediately when the sampler reaches the dlog_z_init, which is 50.0 in my setting. I think hslice works as my grad_u function was called without errors. ndim of the problem is around 90.
Error message:
create run dir: /home/chad/codebase/project/example/xx/_/res/res_100_/seed0/case0/dyn28
using dynamic nested sampling
iter: 2681 | batch: 0 | bound: 1 | nc: 1 | ncall: 865688 | eff(%): 0.310 | loglstar: -inf < -26.582 < inf | logz: -36.999 +/- 0.914 | dlogz: 0.617 > 50.000 Traceback (most recent call last):
File "/home/chad/codebase/project/example/xx/_/dynamic_ns_incremental.py", line 15, in <module>
dynesty_run_batch(500, case_dir, data_file, data_format, parallel_config = {'queue_size': 64},
File "/home/chad/codebase/project/src/xx/RunBatch.py", line 289, in dynesty_run_batch
sample_arr = solver.sample(live_points=live_points, pool=pool, queue_size=parallel_config['queue_size'],
File "/home/chad/codebase/project/src/sampler/NestedSampling.py", line 97, in sample
sampler.run_nested(dlogz_init=dlogz, nlive_init=seed_num,
File "/home/chad/codebase/project/venv/lib/python3.8/site-packages/dynesty-1.1-py3.8.egg/dynesty/dynamicsampler.py", line 1647, in run_nested
File "/home/chad/codebase/project/venv/lib/python3.8/site-packages/dynesty-1.1-py3.8.egg/dynesty/dynamicsampler.py", line 1767, in add_batch
File "/home/chad/codebase/project/venv/lib/python3.8/site-packages/dynesty-1.1-py3.8.egg/dynesty/dynamicsampler.py", line 1128, in sample_batch
File "/home/chad/codebase/project/venv/lib/python3.8/site-packages/dynesty-1.1-py3.8.egg/dynesty/nestedsamplers.py", line 684, in update
File "/home/chad/codebase/project/venv/lib/python3.8/site-packages/dynesty-1.1-py3.8.egg/dynesty/bounding.py", line 584, in update
File "/home/chad/codebase/project/venv/lib/python3.8/site-packages/dynesty-1.1-py3.8.egg/dynesty/bounding.py", line 1316, in bounding_ellipsoid
ValueError: Cannot compute a bounding ellipsoid to a single point if `pointvol` is not specified.
I am using the current development version of dynesty with my own loglikelihood and prior_transform functions. I extracted useful parts in my code so a snippet of my code looks like this:
dns_params={'wt_kwargs': {'pfrac': 1.0},
'stop_kwargs': {'post_thresh': .5},
'nlive_batch': 300,
'maxiter_init': 10000,
'maxiter_batch': 1000,
'maxbatch': 10}
sampler = DynamicNestedSampler(
loglikelihood=loglike,
prior_transform=ptform,
periodic=periodic,
gradient=grad_u,
ndim=90, **kwargs)
sampler.run_nested(dlogz_init=50, nlive_init=500,
**dns_params)
I really want to see the sampling results ASAP. Is there a hacky way to get around this error?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 25 (4 by maintainers)
Fantastic! So glad we could resolve this 😄.