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
unify turn annotation tasks (model chat and turn annotations static tasks) #4162
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a6c0b96
annotation_buckets param to annotations_config_path to match mc
meganung 8979efe
unify the annotation buckets config file format in model chat and tur…
meganung b05a9a4
remove task_description flag (not used)
meganung cc50e50
chat_title->task_title
meganung 21cc451
move task description to html file
meganung 7295418
sample annotation buckets match previous ones for model chat task
meganung 3ff5cfa
update tests
meganung f5ce295
add task config files
meganung 68473a8
PR fixes
meganung b23b2ca
model chat task only supports checkboxes right now
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
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
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
58 changes: 27 additions & 31 deletions
58
parlai/crowdsourcing/tasks/model_chat/task_config/annotations_config.json
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 |
---|---|---|
@@ -1,32 +1,28 @@ | ||
[ | ||
{ | ||
"value": "bucket_0", | ||
"name": "Bucket 0", | ||
"description": "this response implies something...0" | ||
}, | ||
{ | ||
"value": "bucket_1", | ||
"name": "Bucket 1", | ||
"description": "this response implies something...1" | ||
}, | ||
{ | ||
"value": "bucket_2", | ||
"name": "Bucket 2", | ||
"description": "this response implies something...2" | ||
}, | ||
{ | ||
"value": "bucket_3", | ||
"name": "Bucket 3", | ||
"description": "this response implies something...3" | ||
}, | ||
{ | ||
"value": "bucket_4", | ||
"name": "Bucket 4", | ||
"description": "this response implies something...4" | ||
}, | ||
{ | ||
"value": "none_all_good", | ||
"name": "None, all good", | ||
"description": "This response implies that there are no problems with the data" | ||
{ | ||
"config": { | ||
EricMichaelSmith marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"bucket_0": { | ||
"name": "Bucket 0", | ||
"description": "this response implies something...0" | ||
}, | ||
"bucket_1": { | ||
"name": "Bucket 1", | ||
"description": "this response implies something...1" | ||
}, | ||
"bucket_2": { | ||
"name": "Bucket 2", | ||
"description": "this response implies something...2" | ||
}, | ||
"bucket_3": { | ||
"name": "Bucket 3", | ||
"description": "this response implies something...3" | ||
}, | ||
"bucket_4": { | ||
"name": "Bucket 4", | ||
"description": "this response implies something...4" | ||
}, | ||
"none_all_good": { | ||
"name": "None, all good", | ||
"description": "This response implies that there are no problems with the data" | ||
} | ||
} | ||
] | ||
} |
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
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
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
parlai/crowdsourcing/tasks/turn_annotations_static/task_config/task_description.html
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,7 @@ | ||
<br> | ||
<b><h4>Task Description</h4></b> | ||
<br> | ||
Dummy Task Description. | ||
Lorem ipsum. | ||
turnannotations | ||
<br><br> |
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
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
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.
@EricMichaelSmith @meganung I wonder if this logic work for non-checkbox inputtype, e.g. "radio" button,
suppose you click radio_bucket1, and then changed it to radio_bucket2,
I guess in this case, both radio_bucket1, and radio_bucket2 are
True
, which is not exatly what we wantThere 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.
shall we remove L31? and always set
inputType = checkbox
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.
it does work if you specify type: radio in the config - i've done it in turn annotations static tasks at least. Radio buttons you can only select one so only one will be
True
.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.
Hmm interesting - @meganung in that case, do you expect that radio boxes will work correctly in the current version of model_chat as well, given this PR? I suppose I see two possibilities:
(1) we test out that radio buttons render correctly in the current version of model chat (i.e. with only one being checked at once as @jxmsML notes) and then add documentation about how to enable that to the README. In this case we should also add a unit test for radio buttons (or a TODO for a unit test at the very least, although a unit test is of course better)
(2) we just fix
input_type = checkbox
for now, as @jxmsML suggests, and maybe add a TODO to add and test out radio box support for this task in the futureEither possibility is fine with me, but @meganung lemme know what you think :)
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.
good catch @jxmsML and thanks for the input @EricMichaelSmith -- I manually tested it and the frontend is fine (visually you can only check one) but our code for updating the data doesn't do that so ends up saving multiple different values as true if the user switches between selecting different radio buttons. I added a TODO for now since adding support for radio buttons in model chat task can be a separate PR.
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.
cool look good! @EricMichaelSmith just wonder if these frontend changes (e.g. checkbox type) that might affect final data logged has a test somewhere in crowdsourcing task (or will be catched?)
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.
@jxmsML Hmm, anything that affects the final data will break one of the tests, yes - I see that Megan fixed the tests in this PR, but it doesn't look like she needed to fix anything related to the checkbox type, so presumably the checkbox type doesn't get saved in the final data :)