aws / fmeval

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

feat: update various transforms to accept multiple input keys #218

Closed danielezhu closed 3 months ago

danielezhu commented 3 months ago

Description of changes: This PR makes the following changes:

  1. Update GetModelResponse and all three summarization accuracy metric transforms to support multiple input keys
  2. Update TransformPipeline.execute to materialize intermediate datasets (as I've observed that not materializing the dataset leads to a performance degradation in SummarizationAccuracy evaluations). This change causes the performance of SummarizationAccuracy to match the performance of the old code.
  3. Refactor the summarization accuracy metrics to use a parent ABC, mimicking the approach taken with the semantic perturbation transforms.
  4. Fix bug in semantic_perturbations.py where I didn't unpack *args and **kwargs. Updated the unit test to catch this bug.

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