Fix NoiseSensitivity ragas API compatibility #441
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
What and why?
Fixed a
TypeErrorin theNoiseSensitivitytest caused by incompatibility with the ragas library API. The ragasNoiseSensitivitymetric no longer accepts afocusparameter in its constructor, which was causing the test to fail withTypeError: NoiseSensitivity.__init__() got an unexpected keyword argument focus.Removed the
focus=focusparameter from thenoise_sensitivity()metric instantiation while keeping the parameter available in the wrapper function for backward compatibility.How to test
Run the NoiseSensitivity test using the example code:
The test should now execute without the TypeError.
What needs special review?
The
focusparameter is still accepted by the wrapper function but is no longer passed to the underlying ragas metric. Verify that this doesn't break existing behavior or if the parameter should be removed entirely from the function signature.Dependencies, breaking changes, and deployment notes
Release notes
Fixed compatibility issue with ragas library in NoiseSensitivity test that was causing TypeError when running the test.
Checklist