Feature/data augmentation for de biasing#1164
Merged
chakravarthik27 merged 17 commits intorelease/2.6.0from Feb 6, 2025
Merged
Feature/data augmentation for de biasing#1164chakravarthik27 merged 17 commits intorelease/2.6.0from
chakravarthik27 merged 17 commits intorelease/2.6.0from
Conversation
… bias detection logic
…response structure
Contributor
There was a problem hiding this comment.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
langtest/augmentation/debias.py:8
- The word 'seperated' is misspelled. It should be 'separated'.
The following text contains biased information, such as discrimination and stereotyping, which fall into various categories. Each category includes specific subcategories with seperated by ',' , as listed below:
langtest/augmentation/debias.py:216
- The use of 'type[_Schema]' for type hinting might not be compatible with all versions of Python. Consider using 'Type[_Schema]' from the 'typing' module.
def interaction_llm(self, text: str, output_schema: type[_Schema], system_prompt: str) -> _Schema:
Prikshit7766
approved these changes
Jan 24, 2025
Prikshit7766
approved these changes
Jan 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a new debiasing feature to the
langtestpackage, including the addition of a new module for debiasing text, updates to the__init__.pyfile to include this new module, and updates to thepyproject.tomlfile to include a new dependency.New debiasing feature:
langtest/augmentation/debias.py: Added a new module for debiasing text, which includes multiple classes such asBiasDetectionRequest,BiasDetectionResponse,TextDebiasingRequest,DebiasedTextResponse,DebiasingRequest,DebiasingResult, andDebiasTextProcessing. These classes handle the detection and processing of bias in text data.Updates to
__init__.py:langtest/augmentation/__init__.py: AddedDebiasTextProcessingto the list of imports and updated the__all__list to includeDebiasTextProcessing.Dependency updates:
pyproject.toml: Added theollamadependency with version^0.4.6and included anollama_sdkextra group for optional dependencies. [1] [2]