-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation for the Mephisto Review CLI and front-end build work (#612
) * Add review CLI docs * Add more content * Add Contributos & Authors folder * Docs reorg * Update broken link * fix sidebar * Position quickstart at the top of the Guides sidebar * Sidebar and footer updates * Flesh out sidebar organization a bit more
- Loading branch information
Showing
13 changed files
with
127 additions
and
8 deletions.
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
File renamed without changes.
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,2 @@ | ||
label: "How-Tos" | ||
collapsed: false |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
docs/web/docs/quickstart.md → docs/web/docs/guides/quickstart.md
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,3 +1,7 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# 10-minute Quickstart | ||
|
||
First, clone this repo to your local system. | ||
|
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,14 @@ | ||
# Overview | ||
|
||
This section of the documentation will soon be auto-generated. | ||
|
||
In the meanwhile, you may find reference documentation in the following locations: | ||
|
||
- [`mephisto-task`](https://github.com/facebookresearch/Mephisto/tree/main/packages/mephisto-task) - This package provides two hooks to faciliate React-based front-end development for Mephisto tasks. Use `useMephistoTask` for simple, static tasks or `useMephistoLiveTask` for multi-turn, socket-based tasks. | ||
- [`bootstrap-chat`](https://github.com/facebookresearch/Mephisto/tree/main/packages/bootstrap-chat)A set of UI components based on Bootstrap v3 for facilitating chat-based tasks for Mephisto. | ||
- [`annotation-toolkit` and `@annotated`](https://github.com/facebookresearch/Mephisto/tree/main/packages/annotation-toolkit) - This package helps users to build out review & annotation tooling for their research tasks. `annotation-toolkit` has been deprecated in favor of `@annotated`. | ||
- [`cra-template-mephisto-review`](https://github.com/facebookresearch/Mephisto/tree/main/packages/cra-template-mephisto-review) - A customizable base template for creating data exploration interfaces with first-class support for the `mephisto review` command. | ||
- [`mephisto-review-hook`](https://github.com/facebookresearch/Mephisto/tree/main/packages/mephisto-review-hook) - TODO | ||
|
||
|
||
|
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,53 @@ | ||
# Using the Mephisto Review CLI | ||
|
||
Once you've [installed Mephisto](../quickstart), you have access to the `mephisto` command line utility. | ||
|
||
This utility can be used to invoke a review workflow via `$ mephisto review ...`. | ||
|
||
## Overview | ||
|
||
To review data, you must specify: | ||
|
||
1. The actual data to review | ||
2. The visual interface to represent the data | ||
3. If approving/rejecting (as opposed to exploring), what to do with the results | ||
|
||
Here's a sample command: | ||
|
||
```shell | ||
cat input.jsonl | mephisto review --json my-review-interface --stdout | ||
``` | ||
|
||
Here we: | ||
|
||
1. Pipe in the contents of `input.jsonl` to the `mephisto review` command. This is our review data as newline separated JSON objects. (*We also specify the `--json` flag to indicate that this is JSON input as opposed to the default CSV.*) | ||
|
||
2. Point to the build location of our review interface. This is a single-page app that implements the `useMephistoReview()` hook to consume data. (*To start with a starter template, you can you `cra-template-mephisto-review`. We will elaborate on this below.*) | ||
|
||
3. Specify the output of our approve/reject data. For now we will just print it out to standard output with the `--stdout` flag. | ||
|
||
## 1. Use the starter template | ||
|
||
The quickest way to create your own review interface is to use the `cra-template-mephisto-review` template with `create-react-app`: | ||
|
||
``` | ||
npx create-react-app --template mephisto-review my-review-interface | ||
``` | ||
|
||
Once setup, you can build, and test the template: | ||
|
||
```shell | ||
$ cd my-review-interface | ||
$ yarn build | ||
$ cat sample-data.jsonl | mephisto review --json --stdout build/ | ||
``` | ||
|
||
*Note: The template ships with some sample data files: `sample-data.jsonl` and `sample-data.csv`* | ||
|
||
## 2. Create a custom renderer | ||
|
||
TODO | ||
|
||
## 3. Create custom thumbnails | ||
|
||
TODO |
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