MAINT: remove unused per-loader max_examples knobs#1788
Open
romanlutz wants to merge 1 commit into
Open
Conversation
Drops the per-loader max_examples/max_prompts row-limit parameters from five remote seed dataset loaders that have no callers anywhere in pyrit/, tests/, or doc/: comic_jailbreak, msts, promptintel, visual_leak_bench, vlguard. DatasetConfiguration.max_dataset_size already provides group-aware random sampling at the scenario layer, so the per-loader knobs were a redundant (and deterministic-prefix, footgun-prone) second sampling primitive. They were also unreachable from SeedDatasetProvider.fetch_datasets_async, which instantiates each loader with no args. vlsu_multimodal is intentionally left alone because its max_examples is the sole non-self caller anywhere (tests/end_to_end/test_all_datasets.py). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the per-loader
max_examples/max_promptsrow-limit parameters from five remote seed dataset loaders that have no callers anywhere inpyrit/,tests/, ordoc/:comic_jailbreak_dataset.py—max_examplesmsts_dataset.py—max_examplespromptintel_dataset.py—max_promptsvisual_leak_bench_dataset.py—max_examplesvlguard_dataset.py—max_examplesWhy
DatasetConfiguration.max_dataset_size(inpyrit/scenario/core/dataset_configuration.py) already provides group-aware random sampling at the scenario layer. The per-loader knobs were a redundant — and footgun-prone — second sampling primitive with different semantics (deterministic prefix vs. random sample).They were also unreachable from the standard load path:
SeedDatasetProvider.fetch_datasets_asyncinstantiates every loader with bareprovider_class(). The MOSSBench loader was already stripped of the same param in364fe3dbfor the same reason; this PR brings the rest in line.What is NOT changed
vlsu_multimodal_dataset.pyretainsmax_examples— it is the only loader with an actual non-self caller (tests/end_to_end/test_all_datasets.py:92passesmax_examples=6because the remote image hosting is slow/flaky).Verification
uv run pyteston the five touched dataset test files → 120 passedruff format,ruff check,ty) → all green