Address review feedback for Python tooling scripts

Tighten missing-dependency install hints so compare-only dependencies point
to cuda-bench[compare] and plotting/dataframe dependencies point to
cuda-bench[plot], instead of defaulting every script to the broader tools
extra.

Also harden nvbench_compare_legacy by reporting missing or skipped state
summaries as UNKNOWN rows instead of silently dropping them, and by converting
missing axis metadata into the existing JSON-structure error path rather than
leaking StopIteration.

Finally, consolidate duplicate finite-number predicates in both compare
scripts so duration formatting and numeric validation share the same helper.
This commit is contained in:
Oleksandr Pavlyk
2026-07-09 16:50:36 -05:00
parent cc17e96c3b
commit 25005fc9c4
5 changed files with 108 additions and 53 deletions

View File

@@ -29,14 +29,20 @@ def load_nvbench_plot_bwutil_tooling():
if plt is None:
plt = require_tooling_dependency(
ToolingDependency(
"matplotlib.pyplot", "matplotlib", "bandwidth plot rendering"
"matplotlib.pyplot",
"matplotlib",
"bandwidth plot rendering",
extra="plot",
),
tool_name="nvbench-plot-bwutil",
)
if PercentFormatter is None:
ticker = require_tooling_dependency(
ToolingDependency(
"matplotlib.ticker", "matplotlib", "plot axis formatting"
"matplotlib.ticker",
"matplotlib",
"plot axis formatting",
extra="plot",
),
tool_name="nvbench-plot-bwutil",
)