- Notifications
You must be signed in to change notification settings - Fork36
ad-freiburg/aqqu
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is an ancestor of the code accompanying the publication:More AccurateQuestion Answering on Freebase, Hannah Bast and Elmar Haussmann, CIKM 2015
The original version can be found as as the very first commit of thisrepository and under the v1.0 tag.
Follow the instructions below to set up the system. This also includesdescriptions on how to obtain pre-requisite data.
Setup is easy if all pre-requisites are met.
- Docker > 18.09 on 64 bit Linux
- RAM: 40 GB for training the large WebQuestions/WebQSP models
- Disk: about 50 GB for all required data
To setup a Virtuoso instance with the Freebase data needed for Aqqu werecommend to follow the instructions at ourVirtuoso with DockerCompose repository. This willautomatically download the correct version of Freebase and setup Virtuoso withthe exact same settings used by us.
All data required for learning can be found under/nfs/datastets/aqqu_input_data
when on any of the Chair's computer systems,all other data is generated automatically.
cp -r /nfs/datasets/aqqu_input_data/* input/
Outside our system's please contactProf. HannahBast. with the above path to geta download.
When using docker/wharfer with user namespaces you may need to first runchmod o+wX data
so Aqqu running inside docker can write data even if it isa very restricted user likenobody
./build_and_run.sh train -n <user_provided_name> -r <ranker e.g. WQSP_Ranker> <additional args>
./build_and_run.sh backend -n <user_provided_name> -r <ranker e.g. WQSP_Ranker> -p <port> <addtional args>
Thebackend
command does not rebuild the image but reuses the exact imageused for training. Therefore changes to the source code made after the trainstep are not reflected in the behavior ofbackend
.
To try out changeswithout affecting the train/backend image use the debugcommand.
./build_and_run.sh debug -n <user_provided_name> -r <ranker e.g. WQSP_Ranker> -p <port> <addtional args>
Once the changes have been tested the image used by thebackend
command canbe updated using.Note however that this is somewhat dangerous as it does notwork for changes that would make the model incompatible to the trained model.
./build_and_run.sh update -n <user_provided_name>
The Aqqu backend provides a simple JSON API that can easily be tested usingcurl
. If you have the./build_and_run.sh backend …
command running ona server<host>
with port<port>
the following asks for Albert Einstein'splace of birth
curl http://<host>:<port>/?q=where%20was%20albert%einstein%20born
./build_and_run.sh cv -n <user_provided_name> -r <ranker> <dataset name>
To override certain ranker parameters you can use--override
with a JSON object as additional argument for example--override '{"top_ngram_percentile": 15}'
To disable GPU use run above commands with the environment variableNO_GPU=1
To use (nvidia-)docker directly refer to thebuild_and_run.sh
script. Noadditional documentation is provided as this is discouraged the script shouldbe reasonably easy to follow.
About
More Accurate Question Answering on Freebase