Skip to content

docs(readme): include kornia in benchmark tables - #71

Merged
ternaus merged 1 commit into
mainfrom
codex/kornia-readme-plots
May 18, 2026
Merged

ternaus merged 1 commit into
mainfrom
codex/kornia-readme-plots

Conversation

@ternaus

@ternaus ternaus commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Add Kornia columns for RGB, 9-channel, and video README tables, generate 9-channel and video overview plots, and align docs with the published artifacts.

Summary by Sourcery

Update benchmark documentation and figure generation to incorporate Kornia results and new scenario overview plots for 9-channel images and video.

Enhancements:

  • Introduce reusable scenario overview plotting helper to summarize throughput by regime and library for 9-channel image and video benchmarks.
  • Update figure selection guidance to reflect the new overview plots and revised roles of existing benchmark figures.

Documentation:

  • Expand README RGB, 9-channel, and video benchmark tables to include Kornia and additional CPU/GPU regimes and libraries.
  • Add README and documentation descriptions for new 9-channel and video benchmark overview figures and clarify their role alongside existing figures.
  • Align benchmark scope documentation with the finalized published 9-channel and video result sets and Kornia coverage.
  • Document that README figures are generated from the same public CSV exports as other benchmark artifacts.

Chores:

  • Sync new overview CSV artifacts into the public benchmark data set for 9-channel and video scenarios.

Copilot AI review requested due to automatic review settings May 18, 2026 05:13
@sourcery-ai

sourcery-ai Bot commented May 18, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Adds Kornia benchmark results across RGB, 9-channel, and video tables; introduces new scenario overview plots for 9-channel and video benchmarks; and aligns README, figure generation, and benchmark docs with the newly published artifacts and data exports.

File-Level Changes

Change Details Files
Extend README benchmark tables and figures to include Kornia and new 9-channel/video overview plots while keeping figure numbering coherent.
  • Replace the single winner-counts figure section with three sections: 9-channel overview, video overview, and winner counts, updating headings, image paths, and captions accordingly.
  • Expand the RGB benchmark table schema to add CPU/GPU columns for TorchVision, Kornia, and Pillow, and fill in the new throughput values and winners across regimes.
  • Expand the 9-channel and video benchmark tables to include Kornia and, where applicable, TorchVision CPU columns and additional GPU/DataLoader regimes, populating the values from the published data.
README.md
Add scenario overview plotting utility to generate 9-channel and video overview figures and export their CSV summaries from the unified benchmark results.
  • Define a reusable _scenario_overview_plot helper that aggregates per-regime/library median throughput and coverage, writes a CSV summary, and renders log-scale faceted scatter plots with labeled medians and coverage counts.
  • Invoke the new overview plotting function for 9-channel images and 16-frame video in main(), specifying appropriate scenario prefixes and item units, and write the generated CSVs and PNGs under the figures/data directories.
  • Register the new overview figures and CSV exports in the public sync lists so they are copied into docs/benchmark_figures and docs/benchmark_data for website/README consumption.
scripts/paper/generate_figures_and_insights.py
docs/benchmark_data/figure_image9ch_overview.csv
docs/benchmark_data/figure_video16f_overview.csv
Update figure metadata and benchmark documentation to reflect new figures, data exports, and the finalized 9-channel/video Kornia runs.
  • Add the 9-channel and video overview figures to the FIGURES metadata with titles/captions, and renumber the winner-counts figure from 5 to 7 to match the README structure.
  • Revise docs/good_plots.md to describe the new headline and scenario figures, update references to renamed GPU-vs-CPU plots, and reposition winner_counts.png as an appendix figure.
  • Refresh docs/benchmark_scope.md entries for 9-channel and video scenarios to reference the published result directories, document Kornia coverage and unsupported/early-stopped rows, and mark the 9-channel GPU micro/DataLoader and video CPU micro configurations as finalized.
  • Clarify in docs/benchmark_methodology.md that README figures are generated from the same CSVs and that RGB figures are now paired with 9-channel and video scenario overview plots including Kornia.
scripts/paper/generate_figures_and_insights.py
docs/good_plots.md
docs/benchmark_scope.md
docs/benchmark_methodology.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="scripts/paper/generate_figures_and_insights.py" line_range="732-738" />
<code_context>
+        return pd.DataFrame()
+
+    rows: list[dict[str, object]] = []
+    for (regime, regime_label, library), group in scenario.groupby(
+        ["regime", "regime_label", "library"],
+        observed=True,
+        sort=False,
+    ):
+        measured = group[group["measured"]]
+        rows.append(
+            {
+                "regime": str(regime),
</code_context>
<issue_to_address>
**issue (bug_risk):** Clarify how multiple rows per (regime_label, library) are handled before taking a single median per facet.

The aggregation is per (regime, regime_label, library), but the plotting later assumes one row per (regime_label, library) and does `facet[facet['library'] == library].iloc[0]`. If multiple `regime` values share a (`regime_label`, `library`), the selected row is arbitrary and could mask variation. Consider aggregating `summary` further to one row per (`regime_label`, `library`) before plotting, or validating that this combination is unique and failing otherwise.
</issue_to_address>

### Comment 2
<location path="scripts/paper/generate_figures_and_insights.py" line_range="749-753" />
<code_context>
+            },
+        )
+
+    summary = pd.DataFrame(rows)
+    summary["regime_label"] = pd.Categorical(summary["regime_label"], categories=REGIME_ORDER, ordered=True)
+    summary["library"] = pd.Categorical(summary["library"], categories=LIBRARY_ORDER, ordered=True)
+    summary = summary.sort_values(["regime_label", "library"]).reset_index(drop=True)
+    summary.to_csv(GENERATED / f"figure_{output_stem}_overview.csv", index=False)
+
</code_context>
<issue_to_address>
**suggestion:** Using fixed Categorical categories may drop or misorder unexpected regime/library labels.

Coercing `regime_label` and `library` to Categoricals with fixed `REGIME_ORDER`/`LIBRARY_ORDER` will turn any new/unknown labels into `NaN`, which then get sorted to the end. This can silently misorder new regimes/libraries and change their dtype in the CSV in a surprising way. You could either (a) validate that all labels are in the known order lists and fail if not, or (b) extend the category order at runtime by appending any unknown labels so they remain valid, deterministically ordered categories.

```suggestion
    summary = pd.DataFrame(rows)

    # Build category orders that preserve the configured order for known labels
    # while appending any previously unseen labels in a deterministic (sorted) order.
    regime_labels = summary["regime_label"].astype(str)
    library_labels = summary["library"].astype(str)

    summary["regime_label"] = regime_labels
    summary["library"] = library_labels

    regime_seen = set(regime_labels.unique())
    library_seen = set(library_labels.unique())

    unknown_regimes = sorted(regime_seen - set(REGIME_ORDER))
    unknown_libraries = sorted(library_seen - set(LIBRARY_ORDER))

    regime_categories = [c for c in REGIME_ORDER if c in regime_seen] + unknown_regimes
    library_categories = [c for c in LIBRARY_ORDER if c in library_seen] + unknown_libraries

    summary["regime_label"] = pd.Categorical(
        summary["regime_label"],
        categories=regime_categories,
        ordered=True,
    )
    summary["library"] = pd.Categorical(
        summary["library"],
        categories=library_categories,
        ordered=True,
    )

    summary = summary.sort_values(["regime_label", "library"]).reset_index(drop=True)
    summary.to_csv(GENERATED / f"figure_{output_stem}_overview.csv", index=False)
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread scripts/paper/generate_figures_and_insights.py Outdated
Comment thread scripts/paper/generate_figures_and_insights.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates benchmark documentation and generated artifacts to include Kornia across RGB, 9-channel, and video scenarios, plus adds new overview plots for the 9-channel and video benchmarks.

Changes:

  • Add 9-channel and video “scenario overview” plot generation and publish their CSV summaries.
  • Update README benchmark tables to include Kornia (and additional libraries where applicable) across scenarios.
  • Refresh documentation to match published result artifacts and new figure lineup/numbering.

Reviewed changes

Copilot reviewed 7 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/paper/generate_figures_and_insights.py Adds scenario overview figure/CSV generation and updates figure metadata + sync lists.
docs/good_plots.md Updates the recommended figure inventory to include new overview plots and adjust roles.
docs/benchmark_scope.md Refreshes status table entries to point at published artifacts and updated outcomes.
docs/benchmark_methodology.md Documents that README figures are generated from the same CSVs and adds overview-plot context.
docs/benchmark_data/figure_video16f_overview.csv Adds published video overview summary data.
docs/benchmark_data/figure_image9ch_overview.csv Adds published 9-channel overview summary data.
README.md Inserts new overview figures and expands benchmark tables with Kornia (and others) columns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/paper/generate_figures_and_insights.py Outdated
Comment thread scripts/paper/generate_figures_and_insights.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2693a233bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/paper/generate_figures_and_insights.py Outdated
Use regime-wide transform denominators in scenario overview summaries and plots, validate known labels before categorical sorting, and preserve manual layout when saving overview figures.

Update generated overview CSVs, figures, README caption, and regression tests.
@ternaus
ternaus force-pushed the codex/kornia-readme-plots branch from 99fb912 to 1784d1d Compare May 18, 2026 05:55
@ternaus
ternaus merged commit ab69be0 into main May 18, 2026
2 checks passed
@ternaus
ternaus deleted the codex/kornia-readme-plots branch May 18, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants