Skip to content

Commit

Permalink
update documentation to refer to new q2ar script
Browse files Browse the repository at this point in the history
  • Loading branch information
Rowan Zellers committed Feb 14, 2019
1 parent ae532f6 commit 6543568
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ In particular, I have code and checkpoints for the Recognition to Cognition (R2C
We'll treat going from Q->A and QA->R as two separate tasks: in each, the model is given a 'query' (question, or question+answer) and 'response choices' (answer, or rationale). Essentially, we'll use BERT and detection regions to *ground* the words in the query, then *contextualize* the query with the response. We'll perform several steps of *reasoning* on top of a representation consisting of the response choice in question, the attended query, and the attended detection regions. See the paper for more details.

## What this repo has / doesn't have
I have code and checkpoints for replicating my R2C results. You might find the dataloader useful (in dataloaders/vcr.py), as it handles loading the data in a nice way using the allennlp library. You can submit to the [leaderboard](https://visualcommonsense.com/leaderboard/) using my script in 'models/eval_for_leaderboard.py'
I have code and checkpoints for replicating my R2C results. You might find the dataloader useful (in dataloaders/vcr.py), as it handles loading the data in a nice way using the allennlp library. You can submit to the [leaderboard](https://visualcommonsense.com/leaderboard/) using my script in `models/eval_for_leaderboard.py`

You can train a model using `models/train.py`. This also has code to obtain model predictions. Use `eval_all.py` in the main directory to get validation results combining Q->A and QA->R components.
You can train a model using `models/train.py`. This also has code to obtain model predictions. Use `models/eval_q2ar.py` to get validation results combining Q->A and QA->R components.

# Setting up and using the repo

Expand Down
3 changes: 3 additions & 0 deletions models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ python train.py -params multiatt/default.json -folder saves/flagship_answer
python train.py -params multiatt/default.json -folder saves/flagship_rationale -rationale
```

You can combine the validation predictions using
`python eval_q2ar.py -answer_preds saves/flagship_answer/valpreds.npy -rationale_preds saves/flagship_rationale/valpreds.npy`

## Submitting to the leaderboard

VCR features a [leaderboard](https://visualcommonsense.com/leaderboard/) where you can submit your answers on the test set. Submitting to the leaderboard is easy! You'll need to submit something like [the example submission CSV file](https://s3-us-west-2.amazonaws.com/ai2-rowanz/r2c/example-submission.csv). You can use the `eval_for_leaderboard.py` script, which formats everything in the right way.
Expand Down

0 comments on commit 6543568

Please sign in to comment.