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

Website Updates for 2.4.0 #1126

Merged
merged 118 commits into from
Sep 23, 2024
Merged

Website Updates for 2.4.0 #1126

merged 118 commits into from
Sep 23, 2024

Conversation

chakravarthik27
Copy link
Collaborator

No description provided.

…on-data-lost-during-testcase-import-process

Bug/ner evaluation fix in is_pass()
…on-data-lost-during-testcase-import-process

resolved: recovering the transformation object.
…ries-even-when-no-transformations-are-applied

fixed: consistent issues while generated templates
…ce to number of extra templates to be needed
…ries-even-when-no-transformations-are-applied

Chore: Add Option to Configure Number of Generated Templates in Templatic Augmentation
…ries-even-when-no-transformations-are-applied

resolved/augmentation errors
…ries-even-when-no-transformations-are-applied

Fix/augmentations
…s-for-ner-task

Fix/error in accuracy tests for ner task
…ement-the-support-for-multimodal-with-new-vqa-task
…ort-for-multimodal-with-new-vqa-task

Feature/implement the support for multimodal with new vqa task
…cation in text-classification task and predictions in ner task
…s-for-multi-label-classification

Fix/AttributeError in accuracy tests for multi label classification
This commit refactors the PromptGuard class in the modelhandler/promptguard.py module. The changes include:
- Simplifying the initialization process by using a singleton pattern
- Loading the model and tokenizer from Hugging Face
- Preprocessing the input text to remove spaces and mitigate prompt injection tactics
- Calculating class probabilities for a single or batch of texts
- Adding methods to get jailbreak scores and indirect injection scores for a single input text or a batch of texts
- Processing texts in batches to improve efficiency

The commit also includes changes in the safety.py module:
- Importing the PromptGuard class from the modelhandler/promptguard.py module
- Replacing the pipeline usage with the PromptGuard class to get indirect injection scores

Lastly, the commit includes changes in the output.py and sample.py modules:
- Adding a greater than or equal to comparison method in the MaxScoreOutput class
- Updating the comparison method in the QASample class to use the new comparison method in MaxScoreOutput
…lassification task and predictions in ner task
…s-for-multi-label-classification

Refactor fairness test to handle multi-label classification
…ests-with-promptguard

Feature/enhance safety tests with promptguard
Add new tests for text classification and prompt evaluation tutorials
@chakravarthik27 chakravarthik27 self-assigned this Sep 23, 2024
@chakravarthik27 chakravarthik27 merged commit 5324ccb into gh-pages Sep 23, 2024
4 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.

2 participants