mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-05-13 09:45:39 +00:00
Fix for format_axis_value in json format script to handle None value
Add tests to cover such input.
This commit is contained in:
@@ -180,6 +180,9 @@ def format_axis_value(
|
||||
name = axis_value["name"]
|
||||
axis = axes_by_name.get(name, {})
|
||||
value = axis_value["value"]
|
||||
if value is None:
|
||||
return name, ""
|
||||
|
||||
if axis.get("type") == "int64" and axis.get("flags") == "pow2":
|
||||
int_value = int(value)
|
||||
exponent = int_value.bit_length() - 1
|
||||
|
||||
Reference in New Issue
Block a user