Repository navigation
MAINT: Make epsilon greedy RNG helper keyword-only - #4694
Open
Muhammad Siddiq (SiddiqMSF) wants to merge 1 commit into
Open
Muhammad Siddiq (SiddiqMSF) wants to merge 1 commit into
Muhammad Siddiq (SiddiqMSF) wants to merge 1 commit into
Conversation
Clears one entry from the keyword-only baseline tracked in microsoft#4216.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the keyword-only RNG helper migration.
No open issues 🎉
What changed in this PR
This PR advances #4216’s keyword-only cleanup by migrating the epsilon-greedy selector’s private RNG helper without changing its selection logic.
Changes:
- Makes
_derive_rngkeyword-only and updates its sole caller. - Removes the helper’s keyword-only baseline exemption.
- Adds regression coverage for repeatable seeded choices and variation across seeds and run IDs.
| File | Description |
|---|---|
tests/unit/scenario/scenarios/adaptive/test_epsilon_greedy.py |
Adds seeded-selection reproducibility and variation checks. |
pyrit/scenario/scenarios/adaptive/selectors/epsilon_greedy.py |
Makes the RNG helper keyword-only and updates its call. |
build_scripts/keyword_only_baseline.txt |
Removes the migrated helper’s baseline entry. |
Review effort: Balanced
This branch has not been deployed
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.
Relates to #4216
Make the private
_derive_rnghelper in the epsilon greedy selector keyword-only, update its only call, and remove its entry from the keyword-only baseline.Add a test that a seeded selector repeats its choices, and that a different seed or run ID changes them.