Skip to content

fix: correct auto-grade adjustment bounds in docstrings#90

Open
AGRO-CODEX wants to merge 1 commit into
browser-use:mainfrom
AGRO-CODEX:fix/verbose-word-count-print
Open

fix: correct auto-grade adjustment bounds in docstrings#90
AGRO-CODEX wants to merge 1 commit into
browser-use:mainfrom
AGRO-CODEX:fix/verbose-word-count-print

Conversation

@AGRO-CODEX

@AGRO-CODEX AGRO-CODEX commented Jun 26, 2026

Copy link
Copy Markdown

What

Corrects two docstrings in helpers/grade.py that claimed auto-grade adjustments are "capped at +-8% on any axis." The actual bounds differ per axis.

Why

The real clamps in auto_grade_for_clip are:

contrast_adj = max(0.94, min(1.08, contrast_adj))  # [-6%, +8%]
gamma_adj    = max(0.94, min(1.10, gamma_adj))      # [-6%, +10%]
sat_adj      = max(0.94, min(1.06, sat_adj))        # [-6%, +6%]

Gamma can go up to +10% for underexposed clips, not +8%. The module-level docstring and the auto_grade_for_clip docstring both stated "+-8%" which is misleading — a reader checking the docs before tuning the caps would see the wrong range.

Changes

  • Module docstring: replaced "All adjustments capped at +-8% on any axis" with per-axis bounds.
  • auto_grade_for_clip docstring: same correction.

No logic changes.


Summary by cubic

Update module and auto_grade_for_clip docstrings to state the real per-axis bounds for auto-grade adjustments: contrast ±8%, gamma +10%/-6%, saturation ±6%. Fixes the misleading “±8% on any axis” wording; no behavior changes.

Written for commit e1375ad. Summary will update on new commits.

Review in cubic

The module and function docstrings claimed all adjustments were capped
at +-8%, but gamma is actually bounded to [0.94, 1.10] (+10%/-6%) while
contrast is [0.94, 1.08] and saturation is [0.94, 1.06]. Updated both
docstrings to reflect the real per-axis bounds.

@cubic-dev-ai cubic-dev-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.

No issues found across 1 file

Re-trigger cubic

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.

1 participant