Skip to content

Conversation

@chakravarthik27
Copy link
Collaborator

@chakravarthik27 chakravarthik27 commented May 3, 2024

This pull request rectifies a bug in the randomize_age Test within langtest. Previously, the function failed to return the generated test cases after processing the input samples.

Details:

The issue stemmed from placing the append statement within the loop iterating over samples. Originally, the append was placed after the loop, resulting in the generated test cases not being added to the perturbed_samples list.
The fix involves moving the append statement inside the loop after the test case and generating transformations using randomize_ages(s.original). This ensures that each processed sample's test case is captured before moving on to the next iteration.

Benefits:

This fix guarantees that the randomize_ages function correctly returns the generated test cases, enabling proper execution of the testing suite.
By successfully returning the test cases, you can validate your language processing capabilities for handling age-related scenarios within your robustness testing framework.

@chakravarthik27 chakravarthik27 added the 🐛 Bug Something isn't working label May 3, 2024
@chakravarthik27 chakravarthik27 self-assigned this May 3, 2024
@chakravarthik27 chakravarthik27 linked an issue May 3, 2024 that may be closed by this pull request
@chakravarthik27 chakravarthik27 merged commit 33c9933 into release/2.2.0 May 6, 2024
@chakravarthik27 chakravarthik27 added this to the 2.2.0 milestone May 8, 2024
@chakravarthik27 chakravarthik27 deleted the fix/bug-in-randomize_age-test branch August 30, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in Randomize_age test

3 participants