Skip to content

Polish public benchmark documentation#32

Merged
ternaus merged 1 commit into
mainfrom
codex/repo-public-polish
May 4, 2026
Merged

Polish public benchmark documentation#32
ternaus merged 1 commit into
mainfrom
codex/repo-public-polish

Conversation

@ternaus
Copy link
Copy Markdown
Owner

@ternaus ternaus commented May 4, 2026

Summary by Sourcery

Clarify and expand the public description of the imread-benchmark framework, including how results should be interpreted and how assets are generated.

Documentation:

  • Document benchmark capabilities, output formats, and interpretation guidance in the README, including recommendations for decoder selection and benchmark usage.
  • Describe how to generate public README plots, publication-style tables, and figures from benchmark JSON outputs in both README and GCP docs.
  • Refine and clarify the Google Cloud benchmarking guide, including positioning as a replication framework and updating terminology around publication-grade sampling.

Chores:

  • Add contributor guidance for preparing an anonymous review mirror, including a checklist for stripping identity-related artifacts from a separate branch.
  • Clarify decoder registration instructions to use pyproject entry points and document additional internal tooling scripts in the project layout.

Copilot AI review requested due to automatic review settings May 4, 2026 16:17
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 4, 2026

Reviewer's Guide

Documentation-only polish to the public benchmark, clarifying the benchmark scope/results, documenting CLI/asset generation flows, and updating contribution guidance and decoder registration instructions.

Class diagram for decoder registration via entry points and registry

classDiagram
  class BaseDecoder {
    +decode(bytes data) uint8_array
    +decode_path(str path) uint8_array
  }

  class FooDecoder {
    +decode(bytes data) uint8_array
  }

  class DecoderEntryPoint {
    +group_name
    +name
    +target_module
    +target_attr
    +load() BaseDecoder
  }

  class DecoderRegistry {
    -decoders : dict
    +load_from_entry_points()
    +get(str name) BaseDecoder
    +names() list
  }

  BaseDecoder <|-- FooDecoder

  DecoderEntryPoint --> BaseDecoder : loads
  DecoderRegistry "*" --> "*" DecoderEntryPoint : reads
  DecoderRegistry "*" --> "*" BaseDecoder : builds REGISTRY

  class PyprojectEntryPoints {
    +imread_benchmark.decoders
    +foo = imread_benchmark.decoders.foo_decoder:FooDecoder
  }

  PyprojectEntryPoints --> DecoderEntryPoint : defines

  class ImreadBenchmarkCLI {
    +run()
  }

  ImreadBenchmarkCLI --> DecoderRegistry : uses decoders
Loading

File-Level Changes

Change Details Files
Clarify benchmark scope, outputs, and result interpretation in the main README.
  • Rename the benchmark to imread-benchmark and expand the overview to describe CLI usage, worker isolation, DataLoader measurements, GCP runners, and JSON/plot outputs.
  • Add a "What the results mean" section explaining the role of single-thread vs DataLoader throughput and current decoder/platform headline patterns.
  • Refine system requirements, output layout examples, and recommendations sections to distinguish choices for ML training vs pure decode speed and feature-rich applications.
  • Document how to generate public README assets and publication assets from benchmark outputs and clarify that _internal/ is gitignored and should not be committed.
README.md
Improve GCP benchmark documentation and tie it to the main CLI and asset generation pipeline.
  • Reframe GCP scripts as the cloud replication framework for imread-benchmark, clarifying behavior, purpose, and when to use it.
  • Document how to regenerate public README assets and paper assets from GCS outputs, including the _internal/papers/ workspace and its non-tracked status.
  • Clarify sampling rationale, ImageNet usage, and statistical precision language to emphasize benchmark decision-making rather than paper-specific framing.
docs/gcp_benchmarks.md
Extend contributor guidance for anonymous review mirrors and decoder registration/auxiliary tools.
  • Add a checklist for preparing an anonymous review mirror, including removing funding and identity surfaces and verifying via ripgrep.
  • Update decoder registration instructions to use pyproject.toml entry points instead of editing the Python registry directly, and clarify that the runtime registry is built from entry points.
  • Clarify optional dependency/platform marker guidance and expand the project layout description with new tools for plots, paper assets, and README rendering.
CONTRIBUTING.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

@ternaus ternaus merged commit 7d637d7 into main May 4, 2026
5 checks passed
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

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

## Individual Comments

### Comment 1
<location path="README.md" line_range="90" />
<code_context>
+- `torchvision` wins both AMD platforms at peak `DataLoader` throughput and is effectively tied for first on Neoverse V2.
+- `imageio` is not a single-thread leader, but wins peak `DataLoader` throughput on Neoverse V2 in the current GCP runs.
+- OpenCV is rarely the absolute winner, but is consistently close to the local winner and has successful `DataLoader` results on every platform.
+- PyVips is reported for single-thread decode only; it is skipped in fork-based `DataLoader` benchmarks because of libvips threadpool deadlocks in this harness.
+
 ## GitAds Sponsored
</code_context>
<issue_to_address>
**nitpick (typo):** Consider correcting "threadpool" to "thread pool" and aligning the capitalization of PyVips/`pyvips`.

Here, “threadpool” is typically written as “thread pool” in technical docs, and the library appears as “pyvips” elsewhere in the README. For consistency and searchability, consider updating this bullet to use “pyvips” and “thread pool.”

```suggestion
- `pyvips` is reported for single-thread decode only; it is skipped in fork-based `DataLoader` benchmarks because of libvips thread pool deadlocks in this harness.
```
</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 README.md
- `torchvision` wins both AMD platforms at peak `DataLoader` throughput and is effectively tied for first on Neoverse V2.
- `imageio` is not a single-thread leader, but wins peak `DataLoader` throughput on Neoverse V2 in the current GCP runs.
- OpenCV is rarely the absolute winner, but is consistently close to the local winner and has successful `DataLoader` results on every platform.
- PyVips is reported for single-thread decode only; it is skipped in fork-based `DataLoader` benchmarks because of libvips threadpool deadlocks in this harness.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick (typo): Consider correcting "threadpool" to "thread pool" and aligning the capitalization of PyVips/pyvips.

Here, “threadpool” is typically written as “thread pool” in technical docs, and the library appears as “pyvips” elsewhere in the README. For consistency and searchability, consider updating this bullet to use “pyvips” and “thread pool.”

Suggested change
- PyVips is reported for single-thread decode only; it is skipped in fork-based `DataLoader` benchmarks because of libvips threadpool deadlocks in this harness.
- `pyvips` is reported for single-thread decode only; it is skipped in fork-based `DataLoader` benchmarks because of libvips thread pool deadlocks in this harness.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Documentation-focused PR to clarify what imread-benchmark is, how to interpret benchmark outputs, and how to reproduce/regenerate public + publication assets across local and GCP runs.

Changes:

  • Refines README framing (project purpose, result interpretation, recommendations) and updates output/examples + system requirements wording.
  • Expands GCP benchmarking docs to emphasize reproducible cross-machine comparisons and documents regenerating public/paper assets.
  • Updates CONTRIBUTING with guidance for anonymous review mirrors and clarifies decoder registration via pyproject.toml entry points.

Reviewed changes

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

File Description
README.md Rewrites overview/recommendations, adds “what results mean” narrative, updates output layout example, and documents asset regeneration commands.
docs/gcp_benchmarks.md Clarifies purpose of GCP runner scripts and adds steps for regenerating README + paper assets from fetched JSON outputs.
CONTRIBUTING.md Adds anonymous-mirror checklist and updates decoder registration instructions to match entry-point based registry.

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

Comment thread README.md
`imread-benchmark` is a reproducible benchmark framework for JPEG decoding in Python ML pipelines. It provides:

- an installable `imread-benchmark` CLI for local datasets,
- isolated per-library worker environments so conflicting stacks can be benchmarked in one run,
Comment thread README.md
Comment on lines +84 to +88
Current headline patterns:

- `simplejpeg` is a strong single-thread baseline and wins peak `DataLoader` throughput on Intel Emerald Rapids and Neoverse N1.
- `torchvision` wins both AMD platforms at peak `DataLoader` throughput and is effectively tied for first on Neoverse V2.
- `imageio` is not a single-thread leader, but wins peak `DataLoader` throughput on Neoverse V2 in the current GCP runs.
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