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

Mephisto LIGHT worker task #318

Open
wants to merge 1,376 commits into
base: main
Choose a base branch
from
Open

Mephisto LIGHT worker task #318

wants to merge 1,376 commits into from

Conversation

JackUrb
Copy link
Contributor

@JackUrb JackUrb commented Aug 31, 2022

Copy of (#283) post-merge

Overview

Following up on #282, this PR updates the task frontend introduced in #281 to now be in a Mephisto-task format. Note, this now requires using Mephisto version 1.0.0.

Implementation

Due to how Mephisto tasks build, I had to rearrange a number of folders, configure webpack, change react versions, etc. to get things running. That's most of the churn of this PR. Additionally:

  • Replaces the AppRouter component with a LIGHTAppTaskFrame component, which does the type of routing that a Mephisto task expects. This component is also responsible for requesting the correct authorization key for a given worker, and passing the synthesized URL to the underlying task component.
  • Updates the Task component to receive a passed URL and the submit function, though the latter is currently unused right now.
  • Creates the Mephisto run_task.py script that actually launches the mephisto job, requiring a preauth_secret that needs to be shared between the server launch and the Mephisto task. This allows Mephisto to sign the worker's auth token properly.

Some notes here, I've left a few messy components in the LIGHTAppTaskFrame file. These should probably be refactored out. Also unfortunately @JustinPinero I expect there to be a significant amount of manual churn merging your onboarding flow, considering some fairly substantial folder thrash required to get Mephisto up-and-running. When you merge onboarding into this, you'll have to add an onboarding_qualification to the local yaml configuration in order to see your onboarding view (after you insert it in the isOnboarding branch of LIGHTAppTaskFrame). See the local_test.yaml file in crowdsourcing/dialogues/multi_party_chat/hydra_confs folder for an example.

Testing

terminal 1>/Users/jju/LIGHT/deploy/web> ./deploy.sh local-no-models rebuild-task
terminal 2>/Users/jju/LIGHT/crowdsourcing/light_gameplay> python run_task.py 

Navigate to the desired location:
Screen Shot 2022-03-25 at 4 41 33 PM

JustinPinero and others added 30 commits April 26, 2021 12:44
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 31, 2022
@facebook-github-bot
Copy link

Hi @JackUrb!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants