Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchcomp fails to render scatterplot when some data values are empty #3210

Closed
karkhaz opened this issue May 29, 2024 · 0 comments · Fixed by #3211
Closed

Benchcomp fails to render scatterplot when some data values are empty #3210

karkhaz opened this issue May 29, 2024 · 0 comments · Fixed by #3211
Assignees
Labels
[C] Bug This is a bug. Something isn't working.

Comments

@karkhaz
Copy link
Contributor

karkhaz commented May 29, 2024

Here is an example crash.

When some of the results are empty, the following exception gets raised when rendering scatterplots.

 Traceback (most recent call last):
  File "new/tools/benchcomp/bin/benchcomp", line 31, in <module>
    main()
  File "new/tools/benchcomp/bin/benchcomp", line 27, in main
    args.func(args)
  File "/home/runner/work/kani/kani/new/tools/benchcomp/benchcomp/entry/visualize.py", line 19, in main
    generate_visualizations(results)
  File "/home/runner/work/kani/kani/new/tools/benchcomp/benchcomp/visualizers/utils.py", line 122, in __call__
    visualize(results)
  File "/home/runner/work/kani/kani/new/tools/benchcomp/benchcomp/visualizers/__init__.py", line 415, in __call__
    output = template.render(d=data, scatterplot=include_scatterplot)[:-1]
  File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 18, in <module>
  File "/usr/lib/python3/dist-packages/jinja2/filters.py", line 820, in do_round
    return round(value, precision)
TypeError: type Undefined doesn't define __round__ method
@karkhaz karkhaz added the [C] Bug This is a bug. Something isn't working. label May 29, 2024
@karkhaz karkhaz self-assigned this May 29, 2024
karkhaz added a commit to karkhaz/kani that referenced this issue May 29, 2024
Previously, benchcomp would crash while rendering a scatterplot when
some results had non-numeric values, because those values were being
rounded using a function that doesn't handle non-numeric arguments.

This commit fixes model-checking#3210.
karkhaz added a commit to karkhaz/kani that referenced this issue May 29, 2024
Previously, benchcomp would crash while rendering a scatterplot when
some results had non-numeric values, because those values were being
rounded using a function that doesn't handle non-numeric arguments.

This commit fixes model-checking#3210.
karkhaz added a commit to karkhaz/kani that referenced this issue May 29, 2024
Previously, benchcomp would crash while rendering a scatterplot when
some results had non-numeric values, because those values were being
rounded using a function that doesn't handle non-numeric arguments.

This commit fixes model-checking#3210.
karkhaz added a commit that referenced this issue May 29, 2024
Previously, benchcomp would crash while rendering a scatterplot when
some results had non-numeric values, because those values were being
rounded using a function that doesn't handle non-numeric arguments.

This commit fixes #3210.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C] Bug This is a bug. Something isn't working.
Projects
None yet
1 participant