fuzzbench icon indicating copy to clipboard operation
fuzzbench copied to clipboard

Error generating pvalue_heatmap_plots

Open jonathanmetzman opened this issue 3 years ago • 1 comments

Repro command:

PYTHONPATH=. python analysis/generate_report.py -q 2022-02-18-field -c -d /tmp/2022-02-18-field
Traceback (most recent call last):
  File "/home/fuzzbench/analysis/generate_report.py", line 276, in <module>
    sys.exit(main())
  File "/home/fuzzbench/analysis/generate_report.py", line 260, in main
    generate_report(experiment_names=args.experiments,
  File "/home/fuzzbench/analysis/generate_report.py", line 244, in generate_report
    detailed_report = rendering.render_report(experiment_ctx, template,
  File "/home/fuzzbench/analysis/rendering.py", line 48, in render_report
    return template.render(experiment=experiment_results,
  File "/home/fuzzbench/.venv/lib/python3.9/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/fuzzbench/.venv/lib/python3.9/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/fuzzbench/.venv/lib/python3.9/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/fuzzbench/analysis/report_templates/default.html", line 326, in top-level template code
    src="{{ benchmark.bug_mann_whitney_plot }}">
  File "/home/fuzzbench/.venv/lib/python3.9/site-packages/jinja2/environment.py", line 471, in getattr
    return getattr(obj, attribute)
  File "/home/fuzzbench/analysis/benchmark_results.py", line 205, in bug_mann_whitney_plot
    return self._mann_whitney_plot('bug_mann_whitney_plot.svg',
  File "/home/fuzzbench/analysis/benchmark_results.py", line 192, in _mann_whitney_plot
    self._plotter.write_heatmap_plot(p_values,
  File "/home/fuzzbench/analysis/plotting.py", line 440, in write_heatmap_plot
    self._write_plot_to_image(self._pvalue_heatmap_plot,
  File "/home/fuzzbench/analysis/plotting.py", line 128, in _write_plot_to_image
    plot_function(data, axes=axes, **kwargs)
  File "/home/fuzzbench/analysis/plotting.py", line 433, in _pvalue_heatmap_plot
    cbar_ax.set_ticklabels(['p < 0.001', 'p < 0.01', 'p < 0.05', 'NS'])
  File "/home/fuzzbench/.venv/lib/python3.9/site-packages/matplotlib/_api/deprecation.py", line 386, in wrapper
    return func(*inner_args, **inner_kwargs)
  File "/home/fuzzbench/.venv/lib/python3.9/site-packages/matplotlib/colorbar.py", line 925, in set_ticklabels
    self._long_axis().set_ticklabels(ticklabels, minor=minor, **kwargs)
  File "/home/fuzzbench/.venv/lib/python3.9/site-packages/matplotlib/axis.py", line 1720, in set_ticklabels
    raise ValueError(
ValueError: The number of FixedLocator locations (5), usually from a call to set_ticks, does not match the number of ticklabels (4).

jonathanmetzman avatar Mar 10 '22 19:03 jonathanmetzman

I found that removing a value from this list will cause the exception to go away, but it breaks the colorbar. Laszlo could you please take a look at this?

jonathanmetzman avatar Mar 10 '22 19:03 jonathanmetzman