Open Lowerce opened 2 months ago
That is very strange! Is this in a python script or a notebook? Can you rerun it from scratch?
That is very strange! Is this in a python script or a notebook? Can you rerun it from scratch?
In a python script. The corresponding one could work well:
sampler = ReactiveNestedSampler(my_param_names, my_loglike, my_transform)
sampler.stepsampler = SliceSampler(nsteps=10, generate_direction=region_oriented_direction)
sampler.run(min_num_livepoints=400)
How could I "return it from scratch"? I would like to try. ReactiveNestedCalibrator seems behavior different with ReactiveNestedSampler for I can't get the return value of sampler.run from ReactiveNestedCalibrator. It will return an <generator object ReactiveNestedCalibrator.run at 0x1467de3c0>.
By the way, the plot method implemented in ReactiveNestedCalibrator could not work well too. The following issue is raised:
self.sampler.stepsampler.plot(os.path.join(self.sampler.logs['plots'], 'stepsampler.pdf'))
AttributeError: 'ReactiveNestedCalibrator' object has no attribute 'sampler'
I'm quite confused. if you call run() then you should at least get to the first print here: https://github.com/JohannesBuchner/UltraNest/blob/master/ultranest/calibrator.py#L97
sorry for interjecting here, this is something i also faced.
ReactiveNestedCalibrator
returns generator of list of [nstep, result]
.
Only when you access, the actual sampling is performed.
i am running it like
for nstep, results in sampler:
print(f" {nstep:d}", results, sep='\n')
Description
I follow the command recommended in ReactiveNestedCalibrator. But it seems nothing output.
What I Did