-
Notifications
You must be signed in to change notification settings - Fork 555
dataset: add human tasks and benchmark #3214
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
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
d1e1a1b
Human Subsets Tasks
AdnanElAssadi56 7eaff4d
Fixed Multilingual Classification Subset
AdnanElAssadi56 9bc5b87
linting
AdnanElAssadi56 cb3893b
fix citations format
AdnanElAssadi56 ed1af7e
make lint
isaac-chung aa08f35
fix tests
isaac-chung d9fbb44
remove human folder
isaac-chung 52eb9a7
fix relative imports
isaac-chung 94b1f7c
add adapted_from for all human subsets
isaac-chung 6e599fa
fix pydantic errors
isaac-chung 9e61698
add benchmark object
isaac-chung 0cfbe1c
make benchmark discoverable
isaac-chung 926a839
bibtex test
isaac-chung 7a5983e
Apply suggestion
Samoed c3a3b77
Apply suggestions from code review
Samoed f6c3c37
rename & reupload
Samoed 72e9522
upd tests
Samoed 7142999
upd tests again
Samoed 070eea8
add model
Samoed c94fbb6
add benchmark to leaderboard
Samoed e1e28b6
change branch of leaderboard
Samoed 2bab369
remove branch of load data
Samoed a394ed8
fix model meta path
Samoed 91d7262
make mteb importable
Samoed ae0a508
update repo
Samoed 39cec66
Merge branch 'main' into human_tasks
AdnanElAssadi56 df3e263
Update mteb/benchmarks/benchmarks/benchmarks.py
isaac-chung 5b09048
Update mteb/leaderboard/benchmark_selector.py
isaac-chung da9124d
Update mteb/load_results/load_results.py
isaac-chung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from mteb.model_meta import ModelMeta | ||
|
|
||
| human = ModelMeta( | ||
| loader=None, | ||
| name="Human", | ||
| languages=["eng-Latn", "ara-Arab", "rus-Cyrl", "dan-Latn", "nob-Latn"], | ||
| open_weights=True, | ||
| revision="2025_09_25", | ||
| release_date=None, | ||
| n_parameters=None, | ||
| memory_usage_mb=None, | ||
| embed_dim=None, | ||
| license=None, | ||
| max_tokens=None, | ||
| reference=None, | ||
| similarity_fn_name=None, | ||
| framework=[], | ||
| use_instructions=None, | ||
| training_datasets=None, | ||
| public_training_code=None, | ||
| public_training_data=None, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
mteb/tasks/Classification/eng/HUMEEmotionClassification.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from mteb.abstasks.AbsTaskClassification import AbsTaskClassification | ||
| from mteb.abstasks.TaskMetadata import TaskMetadata | ||
|
|
||
|
|
||
| class HUMEEmotionClassification(AbsTaskClassification): | ||
| metadata = TaskMetadata( | ||
| name="HUMEEmotionClassification", | ||
| description="Human evaluation subset of Emotion is a dataset of English Twitter messages with six basic emotions: anger, fear, joy, love, sadness, and surprise.", | ||
| reference="https://www.aclweb.org/anthology/D18-1404", | ||
| dataset={ | ||
| "path": "mteb/HUMEEmotionClassification", | ||
| "revision": "bc2a4c799c86abc5bc138b0de038f46e24e88eb4", | ||
| }, | ||
| type="Classification", | ||
| category="s2s", | ||
| modalities=["text"], | ||
| eval_splits=["test"], | ||
| eval_langs=["eng-Latn"], | ||
| main_score="accuracy", | ||
| date=( | ||
| "2017-01-01", | ||
| "2018-12-31", | ||
| ), # Estimated range for the collection of Twitter messages | ||
| domains=["Social", "Written"], | ||
| task_subtypes=["Sentiment/Hate speech"], | ||
| license="not specified", | ||
| annotations_creators="human-annotated", | ||
| dialect=[], | ||
| sample_creation="found", | ||
| bibtex_citation=r""" | ||
| @inproceedings{saravia-etal-2018-carer, | ||
| abstract = {Emotions are expressed in nuanced ways, which varies by collective or individual experiences, knowledge, and beliefs. Therefore, to understand emotion, as conveyed through text, a robust mechanism capable of capturing and modeling different linguistic nuances and phenomena is needed. We propose a semi-supervised, graph-based algorithm to produce rich structural descriptors which serve as the building blocks for constructing contextualized affect representations from text. The pattern-based representations are further enriched with word embeddings and evaluated through several emotion recognition tasks. Our experimental results demonstrate that the proposed method outperforms state-of-the-art techniques on emotion recognition tasks.}, | ||
| address = {Brussels, Belgium}, | ||
| author = {Saravia, Elvis and | ||
| Liu, Hsien-Chi Toby and | ||
| Huang, Yen-Hao and | ||
| Wu, Junlin and | ||
| Chen, Yi-Shin}, | ||
| booktitle = {Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing}, | ||
| doi = {10.18653/v1/D18-1404}, | ||
| editor = {Riloff, Ellen and | ||
| Chiang, David and | ||
| Hockenmaier, Julia and | ||
| Tsujii, Jun{'}ichi}, | ||
| month = oct # {-} # nov, | ||
| pages = {3687--3697}, | ||
| publisher = {Association for Computational Linguistics}, | ||
| title = {{CARER}: Contextualized Affect Representations for Emotion Recognition}, | ||
| url = {https://aclanthology.org/D18-1404}, | ||
| year = {2018}, | ||
| } | ||
| """, | ||
| prompt="Classify the emotion expressed in the given Twitter message into one of the six emotions: anger, fear, joy, love, sadness, and surprise", | ||
| adapted_from=["EmotionClassification"], | ||
Samoed marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ) | ||
|
|
||
| samples_per_label = 16 | ||
45 changes: 45 additions & 0 deletions
45
mteb/tasks/Classification/eng/HUMEToxicConversationsClassification.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from mteb.abstasks.AbsTaskClassification import AbsTaskClassification | ||
| from mteb.abstasks.TaskMetadata import TaskMetadata | ||
|
|
||
|
|
||
| class HUMEToxicConversationsClassification(AbsTaskClassification): | ||
| metadata = TaskMetadata( | ||
| name="HUMEToxicConversationsClassification", | ||
| description="Human evaluation subset of Collection of comments from the Civil Comments platform together with annotations if the comment is toxic or not.", | ||
| reference="https://www.kaggle.com/competitions/jigsaw-unintended-bias-in-toxicity-classification/overview", | ||
| dataset={ | ||
| "path": "mteb/HUMEToxicConversationsClassification", | ||
| "revision": "4c128c30566ffc7b01c7c3a367da20f36fc08ef8", | ||
| }, | ||
| type="Classification", | ||
| category="s2s", | ||
| modalities=["text"], | ||
| eval_splits=["test"], | ||
| eval_langs=["eng-Latn"], | ||
| main_score="accuracy", | ||
| date=( | ||
| "2017-01-01", | ||
| "2018-12-31", | ||
| ), # Estimated range for the collection of comments | ||
| domains=["Social", "Written"], | ||
| task_subtypes=["Sentiment/Hate speech"], | ||
| license="cc-by-4.0", | ||
| annotations_creators="human-annotated", | ||
| dialect=[], | ||
| sample_creation="found", | ||
| bibtex_citation=r""" | ||
| @misc{jigsaw-unintended-bias-in-toxicity-classification, | ||
| author = {cjadams and Daniel Borkan and inversion and Jeffrey Sorensen and Lucas Dixon and Lucy Vasserman and nithum}, | ||
| publisher = {Kaggle}, | ||
| title = {Jigsaw Unintended Bias in Toxicity Classification}, | ||
| url = {https://kaggle.com/competitions/jigsaw-unintended-bias-in-toxicity-classification}, | ||
| year = {2019}, | ||
| } | ||
| """, | ||
| prompt="Classify the given comments as either toxic or not toxic", | ||
| adapted_from=["ToxicConversationsClassification"], | ||
| ) | ||
|
|
||
| samples_per_label = 16 |
45 changes: 45 additions & 0 deletions
45
mteb/tasks/Classification/eng/HUMETweetSentimentExtractionClassification.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from mteb.abstasks.AbsTaskClassification import AbsTaskClassification | ||
| from mteb.abstasks.TaskMetadata import TaskMetadata | ||
|
|
||
|
|
||
| class HUMETweetSentimentExtractionClassification(AbsTaskClassification): | ||
| metadata = TaskMetadata( | ||
| name="HUMETweetSentimentExtractionClassification", | ||
| description="Human evaluation subset of Tweet Sentiment Extraction dataset.", | ||
| reference="https://www.kaggle.com/competitions/tweet-sentiment-extraction/overview", | ||
| dataset={ | ||
| "path": "mteb/HUMETweetSentimentExtractionClassification", | ||
| "revision": "264bce01a98dfaf3581b53dcaa0fd5e2d44aa589", | ||
| }, | ||
| type="Classification", | ||
| category="s2s", | ||
| modalities=["text"], | ||
| eval_splits=["test"], | ||
| eval_langs=["eng-Latn"], | ||
| main_score="accuracy", | ||
| date=( | ||
| "2020-01-01", | ||
| "2020-12-31", | ||
| ), # Estimated range for the collection of tweets | ||
| domains=["Social", "Written"], | ||
| task_subtypes=["Sentiment/Hate speech"], | ||
| license="not specified", | ||
| annotations_creators="human-annotated", | ||
| dialect=[], | ||
| sample_creation="found", | ||
| bibtex_citation=r""" | ||
| @misc{tweet-sentiment-extraction, | ||
| author = {Maggie, Phil Culliton, Wei Chen}, | ||
| publisher = {Kaggle}, | ||
| title = {Tweet Sentiment Extraction}, | ||
| url = {https://kaggle.com/competitions/tweet-sentiment-extraction}, | ||
| year = {2020}, | ||
| } | ||
| """, | ||
| prompt="Classify the sentiment of a given tweet as either positive, negative, or neutral", | ||
| adapted_from=["TweetSentimentExtractionClassification"], | ||
| ) | ||
|
|
||
| samples_per_label = 32 |
66 changes: 66 additions & 0 deletions
66
mteb/tasks/Classification/multilingual/HUMEMultilingualSentimentClassification.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from mteb.abstasks.AbsTaskClassification import AbsTaskClassification | ||
| from mteb.abstasks.MultilingualTask import MultilingualTask | ||
| from mteb.abstasks.TaskMetadata import TaskMetadata | ||
|
|
||
| _LANGUAGES = { | ||
| "eng": ["eng-Latn"], | ||
| "ara": ["ara-Arab"], | ||
| "nor": ["nor-Latn"], | ||
| "rus": ["rus-Cyrl"], | ||
| } | ||
|
|
||
|
|
||
| class HUMEMultilingualSentimentClassification(AbsTaskClassification, MultilingualTask): | ||
| metadata = TaskMetadata( | ||
| name="HUMEMultilingualSentimentClassification", | ||
| dataset={ | ||
| "path": "mteb/HUMEMultilingualSentimentClassification", | ||
| "revision": "1b988d30980efdd9c27de1643837bf3ae5bae814", | ||
| }, | ||
| description=( | ||
| "Human evaluation subset of Sentiment classification dataset with binary " | ||
| "(positive vs negative sentiment) labels. Includes 4 languages." | ||
| ), | ||
| reference="https://huggingface.co/datasets/mteb/multilingual-sentiment-classification", | ||
| type="Classification", | ||
| category="s2s", | ||
| modalities=["text"], | ||
| eval_splits=["test"], | ||
| eval_langs=_LANGUAGES, | ||
| main_score="accuracy", | ||
| date=("2022-08-01", "2022-08-01"), | ||
| domains=["Reviews", "Written"], | ||
| task_subtypes=["Sentiment/Hate speech"], | ||
| license="not specified", | ||
| annotations_creators="derived", | ||
| dialect=["ar-dz"], | ||
| sample_creation="found", | ||
| bibtex_citation=r""" | ||
| @inproceedings{mollanorozy-etal-2023-cross, | ||
| address = {Dubrovnik, Croatia}, | ||
| author = {Mollanorozy, Sepideh and | ||
| Tanti, Marc and | ||
| Nissim, Malvina}, | ||
| booktitle = {Proceedings of the 5th Workshop on Research in Computational Linguistic Typology and Multilingual NLP}, | ||
| doi = {10.18653/v1/2023.sigtyp-1.9}, | ||
| editor = {Beinborn, Lisa and | ||
| Goswami, Koustava and | ||
| Murado{\\u{g}}lu, Saliha and | ||
| Sorokin, Alexey and | ||
| Kumar, Ritesh and | ||
| Shcherbakov, Andreas and | ||
| Ponti, Edoardo M. and | ||
| Cotterell, Ryan and | ||
| Vylomova, Ekaterina}, | ||
| month = may, | ||
| pages = {89--95}, | ||
| publisher = {Association for Computational Linguistics}, | ||
| title = {Cross-lingual Transfer Learning with \{P\}ersian}, | ||
| url = {https://aclanthology.org/2023.sigtyp-1.9}, | ||
| year = {2023}, | ||
| } | ||
| """, | ||
| adapted_from=["MultilingualSentimentClassification"], | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.