Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

[DRAFT] [BREAKING] FEAT Refactor Harm Category as StrEnum#998

Open
eugeniavkim wants to merge 12 commits intoAzure:main from
eugeniavkim:users/eugeniakim/refactor-harm-categories
Open

[DRAFT] [BREAKING] FEAT Refactor Harm Category as StrEnum #998
eugeniavkim wants to merge 12 commits intoAzure:main from
eugeniavkim:users/eugeniakim/refactor-harm-categories

Conversation

@eugeniavkim
Copy link
Contributor

@eugeniavkim eugeniavkim commented Jul 3, 2025
edited
Loading

Description

In order to make harm_categories easier to search through and group by some alias names, this PR refactors our previous String harm categories into a class HarmCategory with categories that are not included in the list to be recognized in an OTHER category. 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, SeedPrompt initialization, and tests.

The following items must be complete before changing from DRAFT Status:

  • Refactor each dataset to map its harm categories to the new class HarmCategory
  • Update DB queries

@eugeniavkim eugeniavkim changed the title (削除) [DRAFT] [BREAKING] FEAT Refactor Harm Category as an enum (削除ここまで) (追記) [DRAFT] [BREAKING] FEAT Refactor Harm Category as StrEnum (追記ここまで) Jul 3, 2025
"bias": cls.REPRESENTATIONAL,
"sexism": cls.REPRESENTATIONAL,
"racism": cls.REPRESENTATIONAL,
"homophobia": cls.REPRESENTATIONAL,
Copy link
Contributor

@romanlutz romanlutz Jul 12, 2025

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.

SeedPrompt(
value=prompt_text,
data_type="text",
name="XSTest Examples",
Copy link
Contributor Author

@eugeniavkim eugeniavkim Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove name or empty string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@romanlutz romanlutz romanlutz left review comments

At least 1 approving review is required to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /