aws / fmeval

Foundation Model Evaluations Library
http://aws.github.io/fmeval
Apache License 2.0
185 stars 42 forks source link

feat: implement transforms for semantic perturbations #215

Closed danielezhu closed 6 months ago

danielezhu commented 6 months ago

Description of changes: This PR implements Transforms for each of the three semantic perturbation utility classes found here in the current code. The logic for the perturb methods is basically directly copy pasted from our existing code, with some really minor changes for greater code readability. The various test cases included in the unit tests are also directly copied from the existing unit tests for semantic_perturbation_utils.py.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.