Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Mephisto QA data collection #3318

Merged

Conversation

vaibhavad
Copy link
Contributor

@vaibhavad vaibhavad commented Dec 20, 2020

Description
Example of QA Data collection task using Mephisto

Testing steps

cd webapp
npm install; npm run dev
cd ..
python run.py

Discussion
There are two major points where this can be improved -

  1. Dataloader - How to seamlessly integrate the QA data loader to re-use existing ParlAI tasks? The two requirements I can think of are - (1) User should be able to specify task from config, (2) There should be a wrapper on top of original ParlAI task to modify small things (SQuAD returns both Passage and Question, the task may require only passage)
  2. Passage highlighting - Many QA data collection tasks require evidence from the passage. It can be made configurable. There should be a div on top of Worker input to show the span selected from the passage. This will require modifications in the bootstrap-chat package.

@EricMichaelSmith Please review it and suggest changes.

Copy link
Contributor

@EricMichaelSmith EricMichaelSmith left a comment

Choose a reason for hiding this comment

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

Wow, I love this - thanks @vaibhavad for adding this! It'll be a great addition to our set of Mephisto crowdsourcing tasks. I've added a bunch of comments, mostly relating to standard ParlAI and parlai.crowdsourcing conventions, but it looks like the major components are all here. To address your points below:

  1. Yeah, there's a standard ParlAI way to load data - see my comments on this, but happy to explain further if you'd like.
  2. I think showing evidence would be a great add-on here: I'll defer to @JackUrb and @pringshia for advice on configuring the front-end code for this

Great job!

parlai/crowdsourcing/tasks/qa_data_collection/run.py Outdated Show resolved Hide resolved
parlai/crowdsourcing/tasks/qa_data_collection/run.py Outdated Show resolved Hide resolved
parlai/crowdsourcing/tasks/qa_data_collection/run.py Outdated Show resolved Hide resolved
@JackUrb
Copy link
Contributor

JackUrb commented Dec 21, 2020

Hi @vaibhavad, thanks for bringing this together! Definitely agreed that adding more context to a task such that it's not all inline in the chat would be great. In bootstrap-chat we support overriding with custom components within a chat application by providing a file containing those custom components. See how renderSidePane is updated in the custom_simple version of the ParlAI Chat demo here. We even have setups where the context is always updating, like what's present in the PR for multimodal chat here.

While it'd be a great enhancement for sure, I don't think it should stop this from getting merged as is, as this was the level of usability we had for the original task. Can always open a follow-up PR if you want to contribute more!

@vaibhavad
Copy link
Contributor Author

Hi @JackUrb,

Thanks a lot for your comments. I'll explore overriding components in bootstrap-chat, and include evidence marking for QA tasks in a follow-up PR as you suggested.

@EricMichaelSmith EricMichaelSmith self-requested a review December 22, 2020 17:34
Copy link
Contributor

@EricMichaelSmith EricMichaelSmith left a comment

Choose a reason for hiding this comment

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

Thanks so much for all of the refactors on this! Approving now. It looks like Jack is out of the office until next week, but it seems like he agrees that the remaining improvements can be done in a follow-up PR, so it's fine with me if you merge in :)

@vaibhavad
Copy link
Contributor Author

Thanks @EricMichaelSmith for all the constructive feedback throughout. Feels good to have my first contribution.

I don't think I have permission to merge. You or @JackUrb can merge it if no more changes are required.

@EricMichaelSmith
Copy link
Contributor

Thanks @EricMichaelSmith for all the constructive feedback throughout. Feels good to have my first contribution.

I don't think I have permission to merge. You or @JackUrb can merge it if no more changes are required.

Okay cool! It looks like some of the CI checks are failing (linting and stuff) - this is pretty minor, but when I have time today I'll fix those up before merging in (unless you want to take a crack at them first, totally up to you)

@EricMichaelSmith EricMichaelSmith merged commit 9cb8902 into facebookresearch:master Dec 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants