Matplotlib error at dynesty checkpoint plot
Bug identified by @philip.relton.
I think the solution is to either:
- add this error into the caught exceptions, e.g., here.
- catch a generic
Exception
to avoid any future issues. This is generally not optimal, but may be safe enough here.
/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/ticker.py:2072: RuntimeWarning: overflow encountered in multiply
ticks = np.arange(low, high + 1) * step + best_vmin
Traceback (most recent call last):
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/bilby_pipe/data_analysis.py", line 267, in main
analysis.run_sampler()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/bilby_pipe/data_analysis.py", line 242, in run_sampler
**self.sampler_kwargs,
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/bilby/core/sampler/__init__.py", line 182, in run_sampler
result = sampler.run_sampler()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/bilby/core/sampler/dynesty.py", line 365, in run_sampler
out = self._run_external_sampler_with_checkpointing()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/bilby/core/sampler/dynesty.py", line 450, in _run_external_sampler_with_checkpointing
self.plot_current_state()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/bilby/core/sampler/dynesty.py", line 624, in plot_current_state
fig.tight_layout()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/figure.py", line 2476, in tight_layout
pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect)
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/tight_layout.py", line 362, in get_tight_layout_figure
pad=pad, h_pad=h_pad, w_pad=w_pad)
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/tight_layout.py", line 111, in auto_adjust_subplotpars
tight_bbox_raw = union([ax.get_tightbbox(renderer) for ax in subplots
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/tight_layout.py", line 112, in <listcomp>
if ax.get_visible()])
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/axes/_base.py", line 4361, in get_tightbbox
bb_yaxis = self.yaxis.get_tightbbox(renderer)
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/axis.py", line 1162, in get_tightbbox
ticks_to_draw = self._update_ticks()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/axis.py", line 1080, in _update_ticks
major_labels = self.major.formatter.format_ticks(major_locs)
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/ticker.py", line 259, in format_ticks
self.set_locs(values)
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/ticker.py", line 689, in set_locs
self._set_format()
File "/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py37-20201027/lib/python3.7/site-packages/matplotlib/ticker.py", line 785, in _set_format
loc_range_oom = int(math.floor(math.log10(loc_range)))
OverflowError: cannot convert float infinity to integer