nju-websoft / OpenEA

A Benchmarking Study of Embedding-based Entity Alignment for Knowledge Graphs, VLDB 2020
GNU General Public License v3.0
517 stars 80 forks source link

Error in bootEA (maybe because of different number of entities?) #22

Closed sven-h closed 2 years ago

sven-h commented 3 years ago

Hi,

I tested bootEA with my dataset. Unfortunately after some epochs it returned with the following error:

File "main.py", line 26, in model.run() File "/src/openea/approaches/bootea.py", line 311, in run neighbors_num1, self.args.batch_threads_num) File "/src/openea/modules/train/batch.py", line 152, in generate_neighbours_single_thread
entity_embeds, neighbors_num) File "/src/openea/modules/train/batch.py", line 161, in find_neighbours sort_index = np.argpartition(-sim_mat[i, :], k) File "<__array_function__ internals>", line 6, in argpartition File "/envs/openea/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 832, in argp artition return _wrapfunc(a, 'argpartition', kth, axis=axis, kind=kind, order=order) File "/envs/openea/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc return bound(*args, **kwds) ValueError: kth(=25453) out of bounds (890)

maybe you have an idea what is going on there. I can also provide you with the dataset I used (to reproduced the error). However, I haven't tried the other approaches yet.

Best regards Sven

sunzequn commented 3 years ago

Hi Sven,

Sorry for the late reply, because I was very busy over the last few weeks.

I will begin to address these issues in the following days.

Best, Zequn

sunzequn commented 3 years ago

Hi Sven,

Could you please provide more details about this issue? From the log above, it seems that this is because the 'k' value in this line _sort_index = np.argpartition(-simmat[i, :], k) is larger than the size of candidates (i.e., sim_mat.shape[1]). What are the shape of _simmat and the k value here?

sven-h commented 3 years ago

Hi Zequn,

I references in the other issue an example where this error occurs. This also includes a small working example.

Best regards Sven