UCL MEng project
/baselines: template baselines for WikiHop QA/data(untracked): location for WikiHop and GloVe embeddings/experiments: defines jobs to be submitted to the UCL CS cluster/ir: search engine which builds an index for each question (in WikiHop) consisting of the support documents for that question. The index is kept in memory./playground: frontend to interact with data using the search engine/qa: shared utilities for question processing and noun phrase extraction/rc: reading comprehension modules and utilities/rl: reinforcement learning agents/shared: utilities shared between/rland/baselines
- Install jack (see https://github.com/uclmr/jack).
- Place WikiHop v1.1 (
train.json,dev.json) under/data/wikihop/v1.1/. - Create an index by running
python -m ir.search_enginefrom the top level directory (this will take a while). Optionally, to only use a subset of data for faster development, add--subset_sizefollowed by the desired size (e.g.100for 100 questions), or--k_most_common_onlyto only include the k (e.g.5) most common WikiHop relation types. - Run
python -m playground.datareaderfrom the top level directory to start interacting with the data. Use the subset flags from step 3, and--reader=bidafif using BiDAF.
- See steps 1 - 3 under Playground for setup.
- To take advantage of Redis caching for faster reading comprehension answers, install Redis and
run
redis-server rc/redis/redis.confto start a server. To skip caching, use the--nocacheflag in step 3. - Run
python -m baselines.templatesfrom the top level directory to evaluate the template baseline on the data. The set of templates to use can be specified with the--templates_from_fileflag.
- See Steps 1 - 3 under Playground for setup. To evaluate on dev data, repeat Step 3 with
--devto build a second index of dev data, or use the--noevalflag in Step 4 to work with train data only. - Download
glove.6B.50d.txtfrom https://nlp.stanford.edu/projects/glove/ and place it in/data/GloVe. - To use caching, start redis-server as in step 2 in Templates, or use the
--nocacheflag in the next step. - Run
python -m rl.mainfrom the top level directory. Add--random_agentto evaluate a random baseline agent, and/or--run_id=<id>to store checkpoints and TensorBoard summaries. Use the same subset flags (--subset_size=<size>,--k_most_common_only=<k>) that were used to build the index. Seepython -m rl.main --helpfor a comprehensive list of arguments.