Skip to content

Fix nonpositive benchmark iteration counts - #630

Merged
yakew7 merged 1 commit into
yakew7:mainfrom
KingEmma7:fix/positive-benchmark-counts
Sep 13, 2026
Merged

yakew7 merged 1 commit into
yakew7:mainfrom
KingEmma7:fix/positive-benchmark-counts

Conversation

@KingEmma7

Copy link
Copy Markdown
Contributor

Summary

Reject zero and negative --n-permutations and --n-resamples values before the benchmark starts, with argparse errors and tests covering invalid input, valid counts and unchanged defaults.

Type

  • Bug fix

Validation

make check passed: 490 tests, lint, all 14 audit scripts and the CLI smoke tests. The invalid-count regressions fail against the original CLI.

Linked issue

Closes #618
Closes #617

@vercel

vercel Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

@KingEmma7 is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Hey @KingEmma7, your first PR on Fair Code, that's awesome, thank you.

This project is about making AI more accountable, and contributions like yours are what keep that work going. We'll review your changes shortly.

If you haven't already, give the contributing guide a quick read: it covers how audits are structured and what we look for in a review.

And if you're finding Fair Code useful or interesting, a star on the repo genuinely helps more people find it - no pressure, just appreciated.

@github-actions

Copy link
Copy Markdown

@yakew7 @ahmdkaml - new PR touching a path you own, please review.

@yakew7
yakew7 merged commit f1bb33b into yakew7:main Sep 13, 2026
16 of 17 checks passed
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.

faircode benchmark --n-permutations 0 crashes with a raw ZeroDivisionError faircode benchmark --n-resamples 0 crashes with a raw IndexError

2 participants