Skip to content

MAINT: Make epsilon greedy RNG helper keyword-only - #4694

Open
Muhammad Siddiq (SiddiqMSF) wants to merge 1 commit into
microsoft:mainfrom
SiddiqMSF:keyword-only-epsilon-greedy
Open

Muhammad Siddiq (SiddiqMSF) wants to merge 1 commit into
microsoft:mainfrom
SiddiqMSF:keyword-only-epsilon-greedy

Conversation

@SiddiqMSF

Copy link
Copy Markdown

Relates to #4216

Make the private _derive_rng helper 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.

Clears one entry from the keyword-only baseline tracked in microsoft#4216.
Copilot AI balanced review requested due to automatic review settings November 27, 2026 04:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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_rng keyword-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

No deployments
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.

2 participants