Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

More Accurate Question Answering on Freebase

NotificationsYou must be signed in to change notification settings

ad-freiburg/aqqu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Requirements:

  • 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

Setup a Virtuoso Instance with Freebase

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.

Get the Dataset

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.

Train with the provided script

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>

Run with the provided script

./build_and_run.sh backend -n <user_provided_name> -r <ranker e.g. WQSP_Ranker> -p <port> <addtional args>

Debug changes with the provided script

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>

Test the Backend

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

Run Cross Validation with the provided script

./build_and_run.sh cv -n <user_provided_name> -r <ranker> <dataset name>

Overriding parameters

To override certain ranker parameters you can use--override with a JSON object as additional argument for example--override '{"top_ngram_percentile": 15}'

Disabling GPU

To disable GPU use run above commands with the environment variableNO_GPU=1

Using (nvidia-)docker directly

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

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp