thunlp/OpenKE

segmentation fault when using custom dataset

vjviolet opened this issue · 2 comments

Hi, I'm trying my own dataset using TransH, but I got the error:

Input Files Path : ./benchmarks/AmazonBooks/
The toolkit is importing datasets.
The total of relations is 39.
The total of entities is 24915.
The total of train triples is 1790422.
zsh: segmentation fault python train_transh_amazon_books_50.py

and my dataset looks like this:
entity2id.txt:

24915
m.045wq1q 0
m.03_28m 1
m.0h2q1cq 2
m.04y9jxd 3
m.060c1r 4
m.04xf0d6 5
m.02x0g8g 6
m.04fsw6 7
m.06j3dct 8
m.03q106 9
m.04w27p7 10
m.045wq2c 11

train2id.txt:

1790422
104338 24942 3
55339 24916 0
31681 30314 5
106406 24942 0
24942 46023 1
98669 24955 7
7019 24916 3
24942 52519 1
69092 24917 0
26970 48696 8
20907 24942 3
24917 41835 1
35773 24923 0
24942 56856 1

relation2id.txt:

39
http://rdf.freebase.com/ns/type.object.type 0
http://rdf.freebase.com/ns/type.type.instance 1
http://rdf.freebase.com/ns/book.written_work.copyright_date 2
http://www.w3.org/1999/02/22-rdf-syntax-ns#type 3
http://rdf.freebase.com/ns/kg.object_profile.prominent_type 4
http://rdf.freebase.com/ns/book.written_work.subjects 5
http://rdf.freebase.com/ns/book.written_work.date_of_first_publication 6
http://rdf.freebase.com/ns/common.topic.notable_types 7
http://rdf.freebase.com/ns/book.book_subject.works 8
http://rdf.freebase.com/ns/media_common.literary_genre.books_in_this_genre 9
http://rdf.freebase.com/ns/book.written_work.author 10

So in each file, the texts are separated by \t. I have checked all the pathes, type_constrain.txt, and the ids of them is from 0 to N-1.

Not sure where I did wrong. Thanks for your help.

我也有这个问题,跟你的一模一样,请问你是怎么解决的?

我也有这个问题,跟你的一模一样,请问你是怎么解决的?

你解决了吗