langtest icon indicating copy to clipboard operation
langtest copied to clipboard

`random_age` Class not returning test cases

Open chakravarthik27 opened this issue 9 months ago • 0 comments

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 avatar May 03 '24 15:05 chakravarthik27