-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/data augmentation for de biasing #1164
Feature/data augmentation for de biasing #1164
Conversation
… bias detection logic
…response structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
This pull request introduces a new debiasing feature to the
langtest
package, including the addition of a new module for debiasing text, updates to the__init__.py
file to include this new module, and updates to thepyproject.toml
file 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
: AddedDebiasTextProcessing
to the list of imports and updated the__all__
list to includeDebiasTextProcessing
.Dependency updates:
pyproject.toml
: Added theollama
dependency with version^0.4.6
and included anollama_sdk
extra group for optional dependencies. [1] [2]