xwhan / deeppath Goto Github PK
View Code? Open in Web Editor NEWcode and docs for my EMNLP paper "DeepPath: A Reinforcement Learning Method for Knowledge Graph Reasoning"
code and docs for my EMNLP paper "DeepPath: A Reinforcement Learning Method for Knowledge Graph Reasoning"
When I browse your code and datasets, I found some question which can solve by your giving information. So I want to ask whether the project is part of the open-source or not.
Thank you for your code, I would like to reproduce experimental results of Freebase datasets presented in the paper. Would you please let me know what 20 tasks (relations) you used for the experiment? Some of them are mentioned in the paper such as teamSports, birthPlace but not all 20 tasks. Thanks.
I ran this code successfully on the following enviroment within Docker Desktop:
Python 2.7.3 (Notice that python version under 3.0 is necessary due to the existence of many utilization of the "print" function without brackets, which would throw errors if versions above 3.0 are implemented)
Tensorflow 1.13.1 (I didnt manage to setup the gpu version)
About the dataset:
You should copy the download URL of NELL-995 into your downloading software instead of visiting it directly in your broswer, while FB15k-237 can be done so.
Reason why use the docker:
Hi xwhan:
Thanks for your work and code. Could you update some information about file, such as tasks/${relation}/train_pos
and tasks/${relation}/graph.txt
. Thanks!
sli_police中teacher是什么意思呢,调用的那个函数
Would you please explain every file in tasks/${relation} and describe their constructing process,the information in readme is not so detail.Thanks
Hi,
Could you please add the prerequisites package (eg. tensorflow version) for this repo.?
Thanks.
1,
A lives in C. (A, liveInCity, C)
B lives in C. (B, liveInCity, C)
Does A and B live in the same city?
2,
A is 180 cm height. (A, height, 180)
B is 175 cm height. (B, height, 175)
Is B taller than A?
Thank you very much.
Hello, thank you very much for your code. When I reproduce the comparison algorithm PRA, I cannot use your data set NELL-995 or Freebase to generate an edges file on the PRA program. Can you tell me what format should be used when I run The following instructions in the PRA program:
java -cp pra-src-20140421.jar edu.cmu.pra.data.WKnowledge createEdgeFile NELL.08m.165.cesv.csv 0.8 edges
Thanks again
python 2.7 cannot install tensorflow1.13.1,how can they combine to run this program?it cannot work.
Hi Wenhan, I try to train this program, but the training is very slow on my machine.
It seems that the program does not use the GPU on my machine.
But I'm sure that the tensorflow in my system can employ the GPU acceleration, because I have tested it using other programs.
Is there any idea for that?
Thank you very much!
Thank you for your code, I am trying to re-produce MAP results of TransE model using NELL-995 for relation as the paper presented but not using pretrained embeddings such as task/relation/entity2vec.vec. I wonder how you generated supporting triples for your train.txt dataset which are all necessary triples used for training task/relation/train_pos.txt. I assume you didn't use only task/relation/train_pos.txt for training.
Thanks
Hi, I am trying to run your code to learn some rules, I use python 2.7 and tensorflow 1.12.0 and I have some problems that may be caused by tensorflow's version, so do you still remeber your tensorflow version when you write this code ?
Thanks!
Hi Dear Author, can I ask why there is a model parameter updating during testing (here)
In policy_agent.py, the retraining code, why there is a BFS teacher-guided training after the agent failed?
This is not the same as the algorithm decription.
Does this mean BFS is the upper bound of the RL agent?
Hi Wenhan,
I have learned your excellent works such as DeepPath and DIVA. However, I have some questions about the details of which 20 relations you actually selected in the FB15k-237. Of course, if you can release the processed FB15k-237 with selected relations, I will be deeply grateful.
Look forward to your reply.
I downloaded the NELL-995 dataset as instructed, but only found processed training data for 12 relations vs. 200 mentioned in the paper.
Would you be able to release a script for generating data for the other relations?
Hi Wenhan,
I have read most work on KGR( DeepPath, MINERVA, ReinforceWalk, DIVA) recently, but I can't find out that why task settings such as (s, ?, t) or (s, r, t)? are easier than (s, r, ?), look forward to your point of view?
hi,
can you share the work of A.vec and how to get the A.vec file
Hi Wenhan,
I found this error when running this command ./link_prediction_eval.sh concept_athletehomestadium (I run it in a CPU server that has Python 2.7, Keras, and Tensorflow).
Using TensorFlow backend.
11
How many paths used: 11
evaluate.py:42: UserWarning: The nb_epoch
argument in fit
has been renamed epochs
.
model.fit(training_features, train_labels, nb_epoch=300, batch_size=128)
Traceback (most recent call last):
File "evaluate.py", line 260, in
evaluate_logic()
File "evaluate.py", line 108, in evaluate_logic
model = train(kb, kb_inv, named_paths)
File "evaluate.py", line 42, in train
model.fit(training_features, train_labels, nb_epoch=300, batch_size=128)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 952, in fit
batch_size=batch_size)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 751, in _standardize_user_data
exception_prefix='input')
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training_utils.py", line 102, in standardize_input_data
str(len(data)) + ' arrays: ' + str(data)[:200] + '...')
ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 1 array(s), but instead got the following list of 4867 arrays: [array([[0],
[0],
[0],
[0],
[0],
[0],
[0],
[1],
[1],
[1],
[1]]), array([[0],
[0],
[0],
[0],
[0],
...
Is this was caused by the Keras Library? The transR_eval.py, transE_eval.py, transX_eval.py worked fine.
Could you advise me how to solve this?
Thank you very much.
Hi there and thanks a lot for your nice work.
I unfortunately could not access the NELL-995 dataset via your link, I am getting a 403 error: https://sites.cs.ucsb.edu/~xwhan/datasets/NELL-995.zip
Any chance somebody could make it available?
It is fine to run this code with NELL-995. However, I got stuck in process of running the same code with FB15k-237 dataset. Is there any edit of code that I should change when I run a different dataset?
I found that NELL-995 includes a file called "A.bern" already, while this file does not exist in FB15k-237 dataset. What exactly is this "A.bern" file used for and where can I use it? Does the source code cope with this dataset issues, or, how can I solve this problem and run the code on FB15k-237 data set smoothly?
I would be very grateful if you can answer my question in detail. Looking forward to further idea exchanges and discussions with you.
How does your model works on the FB15K-237 Dataset, as mentioned by your paper?
does this project provide a code lacking of some important informantion? All of us meet all kinds of codes in this opening codes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.