Skip to content

Seed the evaluator's bootstrap by default - #915

Open
WatchTree-19 wants to merge 1 commit into
huggingface:mainfrom
WatchTree-19:fix/bootstrap-default-seed
Open

WatchTree-19 wants to merge 1 commit into
huggingface:mainfrom
WatchTree-19:fix/bootstrap-default-seed

Conversation

@WatchTree-19

Copy link
Copy Markdown

With strategy="bootstrap" and no random_state, scipy's bootstrap draws fresh resamples on every call, so the same predictions give a different confidence interval and standard error each time the evaluator runs. The repo's own bootstrap tests all pass random_state=0 to get stable numbers.

When random_state is None, the evaluator now seeds the bootstrap with 0. Passing an int still sets the seed as before.

Before, two runs on the same predictions gave two different intervals; now they give the same one.

Tests: 1 new in tests/test_evaluator.py, fails on main.

#890 edits the same function (it forwards metric kwargs into the bootstrap), so whichever lands second needs a small rebase.

With strategy="bootstrap" and no random_state, scipy's bootstrap draws
fresh resamples on every call, so the same predictions give a different
confidence interval and standard error each time the evaluator runs.
The repository's own bootstrap tests all pass random_state=0 to get
stable numbers.

When random_state is None, the evaluator now seeds the bootstrap with 0.
Passing an int still sets the seed as before.
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