Skip to content

Conversation

@KutalVolkan
Copy link
Contributor

Description

Fixes #1259

The max_iterations parameter was validated and stored but never used in the perturbation loop.

Changes

  • Fixed _perturb_word() to iterate max_iterations times before returning
  • Added parametrized test to verify max_iterations affects output
  • Updated notebook documentation to explain both max_iterations and proportion parameters

cc @romanlutz

Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this and for adding the extra test. (And so fast!)

It's a pleasure to collaborate with you, as always 🙂

@romanlutz romanlutz merged commit fce5d51 into Azure:main Dec 21, 2025
20 checks passed
@KutalVolkan
Copy link
Contributor Author

Thank you for fixing this and for adding the extra test. (And so fast!)

It's a pleasure to collaborate with you, as always 🙂

Thanks Roman! Well, I introduced the bug in the first place, so only fair I fix it 😅 Always a pleasure collaborating with you too!

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.

BUG CharSwapConverter: max_iterations parameter is unused

2 participants