def test_remote_figures(): from runner import History from helpers import save_fig_to_str h = History() ioff() plot([1, 2], [3, 4]) s = save_fig_to_str() h.summary = dict(test_figure=s) h.show_fig('test_figure')
def summarize(self, history): trace = history.get_traces('p_heads') figure() trace.hist() posterior = helpers.save_fig_to_str() return dict(posterior=posterior)