Hanging when generating samples from prior
@sylvia.biscoveanu noticed that PESummary ran for a long time without producing any plots. After some digging we found that PESummary was hanging when trying to generate samples from the prior using bilby
. To test this, we ran the following lines of code in a standard python shell:
>>> from bilby.core.result import read_in_result
>>> data = read_in_result("/home/sylvia.biscoveanu/bilby_pipe/runs/151216_psd_marg/median_psd/result/dynesty_IMRPhenomPV2_GW151216_data0_1134293073-165_analysis_H1L1_dynesty_merged_result.json")
>>> data.priors.samples(10)
And data.priors.sample(10)
did indeed hang. We let it run for 10 minutes and nothing was produced. After 10 minutes we killed the job and received the following traceback:
>>> data.priors.sample(10)
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/charlie.hoy/virtualenvs/pesummary/lib/python3.6/site-packages/bilby/core/prior.py", line 315, in sample
return self.sample_subset_constrained(keys=list(self.keys()), size=size)
File "/home/charlie.hoy/virtualenvs/pesummary/lib/python3.6/site-packages/bilby/core/prior.py", line 358, in sample_subset_constrained
[all_samples[key], samples[key][keep].flatten()])
File "/home/charlie.hoy/virtualenvs/pesummary/lib/python3.6/site-packages/numpy/core/shape_base.py", line 338, in hstack
return _nx.concatenate(arrs, 0)
KeyboardInterrupt
I am running bilby==0.5.8
. I think @gregory.ashton has also noticed PESummary running slow with a bilby result file and I suspect that it is the same problem.