coling2018-graph-neural-networks-question-answering icon indicating copy to clipboard operation
coling2018-graph-neural-networks-question-answering copied to clipboard

wikidata

Open huiwudiyi opened this issue 6 years ago • 12 comments

when I run runserver.py .I found a error in "questionanswering/grounding/graph_queries.py"

from wikidata import scheme, endpoint_access, queries ImportError: cannot import name 'scheme'

I have already installed wikidata.

huiwudiyi avatar Sep 28 '18 09:09 huiwudiyi

Hi,

some of our internal packages are still missing from the code. It was initially published to give more insights into the paper and the experiments.

We are planing with the missing parts to update it in October to support the training and running pre-trained models. Sorry for the inconvenience!

Best, Daniil

daniilsorokin avatar Sep 28 '18 10:09 daniilsorokin

ok ,look forward to your update!

huiwudiyi avatar Sep 28 '18 10:09 huiwudiyi

Hi, I have finally added a lot of additional info on required internal packages and Wikidata endpoint. Will expand on it even further, but let me know if need anything specific.

daniilsorokin avatar Dec 19 '18 18:12 daniilsorokin

Hi,Thank you for your share. I have followed your instructions above. I download the zip of wikidata ,Unfortunately I get the error as below: File "/home/coling2018-graph-neural-networks-question-answering/questionanswering/grounding/graph_queries.py", line 6, in from wikidata import scheme, endpoint_access, queries File "/home/coling2018-graph-neural-networks-question-answering/wikidata/endpoint_access.py", line 4, in from SPARQLWrapper import SPARQLWrapper, JSON ModuleNotFoundError: No module named 'SPARQLWrapper'

Actually,I just want to run through the model to see the entire workflow. Just for quick understand the paper better. In fact, I do not need the final model.

BettyHcZhang avatar Feb 28 '19 03:02 BettyHcZhang

Hi,

try installing SPARQLWrapper with:

pip install SPARQLWrapper

Best, Daniil

daniilsorokin avatar Feb 28 '19 07:02 daniilsorokin

Thank you very much!

BettyHcZhang avatar Feb 28 '19 08:02 BettyHcZhang

Sure, get it here: https://public.ukp.informatik.tu-darmstadt.de/coling2018-graph-neural-networks-question-answering/webqsp.examples.train.silvergraphs.02-12.el.unittest.json

and put into data/generated/ folder.

daniilsorokin avatar Feb 28 '19 08:02 daniilsorokin

Thank you for your help. I have another question about how the GNN used in semantic graph. Suppose that: we use simple GNN model: f=f(AHW). A is adjacent matrix of nodes.H is embedding of labels. W is wights matrix. Vg=ReLU(Wh + b). Loss as your paper. For one question , we have N candidate graphs.Then we have N Vg output.So we trained the wights matrix(W) by SGD on each f(AHW). Then We have N trained graph model. Then , I have a new question, it has M candidate graphs.How to use previous trained model to get the right answer?Which model should I use in those N graph model? Looking forward to your reply!

BettyHcZhang avatar Mar 21 '19 06:03 BettyHcZhang

To answer your question: you do not train N graph models, you train a single model that is applied across all graphs.

daniilsorokin avatar Sep 18 '19 21:09 daniilsorokin

Hey gusy,what's up!I try to run runserver.py,but I can not find the qaserver.pyt under questionanswering folder.Did I miss something?

blackkingback avatar May 21 '20 05:05 blackkingback

@daniilsorokin Is there any update on a newer version of the code with required dependencies?

purvanshi avatar Jun 22 '20 17:06 purvanshi

@daniilsorokin I have got this error: ImportError: cannot import name 'queries' from 'wikidata' (/root/anaconda3/envs/nlp/lib/python3.8/site-packages/wikidata/init.py)

So, how to install the python module named "wikidata"?

The command I adopted is "pip install wikidata".

Dinxin avatar Jul 07 '22 07:07 Dinxin