Skip to content
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

Merged

Conversation

chakravarthik27
Copy link
Collaborator

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 the pyproject.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 as BiasDetectionRequest, BiasDetectionResponse, TextDebiasingRequest, DebiasedTextResponse, DebiasingRequest, DebiasingResult, and DebiasTextProcessing. These classes handle the detection and processing of bias in text data.

Updates to __init__.py:

Dependency updates:

  • pyproject.toml: Added the ollama dependency with version ^0.4.6 and included an ollama_sdk extra group for optional dependencies. [1] [2]

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:

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.

@chakravarthik27 chakravarthik27 self-assigned this Jan 20, 2025
@chakravarthik27 chakravarthik27 linked an issue Jan 24, 2025 that may be closed by this pull request
@chakravarthik27 chakravarthik27 merged commit 9daebd2 into release/2.6.0 Feb 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data augmentation for de-biasing
2 participants