This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add glue hf datasets #3624
Merged
Merged
Add glue hf datasets #3624
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1a30f86
add glue tasks and their hf configs
meganung 47a5343
handle if labels field is not classlabel type
meganung 753a761
add superglue datasets
meganung 1dec534
add superglue to the task list
meganung f156829
tests! and added makedir for the datapath for .lengths files
meganung 3515d08
MultiTaskTeacher and evaluation datasets only have test split
meganung 22b4372
adding mnli matched and mismatched eval datasets
meganung 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 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 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,47 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
from parlai.utils.testing import AutoTeacherTest | ||
|
||
|
||
class TestDefaultTeacher(AutoTeacherTest): | ||
task = "glue" | ||
|
||
|
||
class TestColaTeacher(AutoTeacherTest): | ||
task = "glue:cola" | ||
|
||
|
||
class TestMnliTeacher(AutoTeacherTest): | ||
task = "glue:mnli" | ||
|
||
|
||
class TestMrpcTeacher(AutoTeacherTest): | ||
task = "glue:mrpc" | ||
|
||
|
||
class TestQnliTeacher(AutoTeacherTest): | ||
task = "glue:qnli" | ||
|
||
|
||
class TestQqpTeacher(AutoTeacherTest): | ||
task = "glue:qqp" | ||
|
||
|
||
class TestRteTeacher(AutoTeacherTest): | ||
task = "glue:rte" | ||
|
||
|
||
class TestSst2Teacher(AutoTeacherTest): | ||
task = "glue:sst2" | ||
|
||
|
||
class TestStsbTeacher(AutoTeacherTest): | ||
task = "glue:stsb" | ||
|
||
|
||
class TestWnliTeacher(AutoTeacherTest): | ||
task = "glue:wnli" |
This file contains 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,88 @@ | ||
acts: | ||
- - episode_done: true | ||
eval_labels: | ||
- contradiction | ||
hypothesis: The cat did not sit on the mat. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
premise: The cat sat on the mat. | ||
text: 'The cat sat on the mat. | ||
|
||
The cat did not sit on the mat.' | ||
- - episode_done: true | ||
eval_labels: | ||
- contradiction | ||
hypothesis: The cat sat on the mat. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
premise: The cat did not sit on the mat. | ||
text: 'The cat did not sit on the mat. | ||
|
||
The cat sat on the mat.' | ||
- - episode_done: true | ||
eval_labels: | ||
- contradiction | ||
hypothesis: When you've got snow, it's really hard to learn a snow sport so we | ||
looked at all the different ways I could mimic being on snow without actually | ||
being on snow. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
premise: When you've got no snow, it's really hard to learn a snow sport so we | ||
looked at all the different ways I could mimic being on snow without actually | ||
being on snow. | ||
text: 'When you''ve got no snow, it''s really hard to learn a snow sport so we | ||
looked at all the different ways I could mimic being on snow without actually | ||
being on snow. | ||
|
||
When you''ve got snow, it''s really hard to learn a snow sport so we looked | ||
at all the different ways I could mimic being on snow without actually being | ||
on snow.' | ||
- - episode_done: true | ||
eval_labels: | ||
- contradiction | ||
hypothesis: When you've got no snow, it's really hard to learn a snow sport so | ||
we looked at all the different ways I could mimic being on snow without actually | ||
being on snow. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
premise: When you've got snow, it's really hard to learn a snow sport so we looked | ||
at all the different ways I could mimic being on snow without actually being | ||
on snow. | ||
text: 'When you''ve got snow, it''s really hard to learn a snow sport so we looked | ||
at all the different ways I could mimic being on snow without actually being | ||
on snow. | ||
|
||
When you''ve got no snow, it''s really hard to learn a snow sport so we looked | ||
at all the different ways I could mimic being on snow without actually being | ||
on snow.' | ||
- - episode_done: true | ||
eval_labels: | ||
- contradiction | ||
hypothesis: Out of the box, Ouya doesn't support media apps such as Twitch.tv | ||
and XBMC media player. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
premise: Out of the box, Ouya supports media apps such as Twitch.tv and XBMC media | ||
player. | ||
text: 'Out of the box, Ouya supports media apps such as Twitch.tv and XBMC media | ||
player. | ||
|
||
Out of the box, Ouya doesn''t support media apps such as Twitch.tv and XBMC | ||
media player.' | ||
num_episodes: 1104 | ||
num_examples: 1104 |
This file contains 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,88 @@ | ||
acts: | ||
- - episode_done: true | ||
hypothesis: The cat did not sit on the mat. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
labels: | ||
- contradiction | ||
premise: The cat sat on the mat. | ||
text: 'The cat sat on the mat. | ||
|
||
The cat did not sit on the mat.' | ||
- - episode_done: true | ||
hypothesis: The cat sat on the mat. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
labels: | ||
- contradiction | ||
premise: The cat did not sit on the mat. | ||
text: 'The cat did not sit on the mat. | ||
|
||
The cat sat on the mat.' | ||
- - episode_done: true | ||
hypothesis: When you've got snow, it's really hard to learn a snow sport so we | ||
looked at all the different ways I could mimic being on snow without actually | ||
being on snow. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
labels: | ||
- contradiction | ||
premise: When you've got no snow, it's really hard to learn a snow sport so we | ||
looked at all the different ways I could mimic being on snow without actually | ||
being on snow. | ||
text: 'When you''ve got no snow, it''s really hard to learn a snow sport so we | ||
looked at all the different ways I could mimic being on snow without actually | ||
being on snow. | ||
|
||
When you''ve got snow, it''s really hard to learn a snow sport so we looked | ||
at all the different ways I could mimic being on snow without actually being | ||
on snow.' | ||
- - episode_done: true | ||
hypothesis: When you've got no snow, it's really hard to learn a snow sport so | ||
we looked at all the different ways I could mimic being on snow without actually | ||
being on snow. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
labels: | ||
- contradiction | ||
premise: When you've got snow, it's really hard to learn a snow sport so we looked | ||
at all the different ways I could mimic being on snow without actually being | ||
on snow. | ||
text: 'When you''ve got snow, it''s really hard to learn a snow sport so we looked | ||
at all the different ways I could mimic being on snow without actually being | ||
on snow. | ||
|
||
When you''ve got no snow, it''s really hard to learn a snow sport so we looked | ||
at all the different ways I could mimic being on snow without actually being | ||
on snow.' | ||
- - episode_done: true | ||
hypothesis: Out of the box, Ouya doesn't support media apps such as Twitch.tv | ||
and XBMC media player. | ||
id: huggingface | ||
label_candidates: | ||
- entailment | ||
- neutral | ||
- contradiction | ||
labels: | ||
- contradiction | ||
premise: Out of the box, Ouya supports media apps such as Twitch.tv and XBMC media | ||
player. | ||
text: 'Out of the box, Ouya supports media apps such as Twitch.tv and XBMC media | ||
player. | ||
|
||
Out of the box, Ouya doesn''t support media apps such as Twitch.tv and XBMC | ||
media player.' | ||
num_episodes: 1104 | ||
num_examples: 1104 |
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.
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.
for evaluation datasets, changed mapping of train and valid to None e.g.
hf_splits_mapping = {'train': None, 'valid': None, 'test': 'test'}
and removed the task from the tests and the multitaskteacher, otherwise will produce errors. e.g.display_data -t glue:ax
will work only if you set the datatype to test now.