-
Couldn't load subscription status.
- Fork 588
[DRAFT] [BREAKING] FEAT Refactor Harm Category as StrEnum #998
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
base: main
Are you sure you want to change the base?
[DRAFT] [BREAKING] FEAT Refactor Harm Category as StrEnum #998
Conversation
pyrit/models/harm_category.py
Outdated
| "bias": cls.REPRESENTATIONAL, | ||
| "sexism": cls.REPRESENTATIONAL, | ||
| "racism": cls.REPRESENTATIONAL, | ||
| "homophobia": cls.REPRESENTATIONAL, |
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.
If multiple map to the same one then it's possible that a list of categories maps to a list with duplicates. We should eliminate the duplicates and have a test case for that. It could otherwise result in double counting depending on how downstream code consumes these.
Description
In order to make
harm_categorieseasier to search through and group by some alias names, this PR refactors our previousStringharm categories into a classHarmCategorywith categories that are not included in the list to be recognized in anOTHERcategory. This also does not include all harm categories, but others can continue to add harm areas that they would like to probe for and score with.This PR is a breaking change as it does affect all datasets,
SeedPromptinitialization, and tests.The following items must be complete before changing from DRAFT Status:
HarmCategory