Git Product home page Git Product logo

Comments (4)

Filco306 avatar Filco306 commented on September 14, 2024

I get the exact same error. The issue is that some of the queries has less than 20 candidates, so it will be skipped, yielding lists of length 0.

The issue arises when query P2629 is sampled. I overrided this by simply changing

yield support_pairs, query_pairs, false_pairs, support_left, support_right, query_left, query_right, false_left, false_right

to

if len(support_pairs) > 0:
     yield support_pairs, query_pairs, false_pairs, support_left, support_right, query_left, query_right, false_left, false_right

in the Extractor_generate function.

However, I would very much like to hear the reply from @Panda0406 on what the original code was, since this bug appears in the settings given. I used the hyperparameters given by @Panda0406 in #5 . I doubt @genggengcss was able to reproduce the results with this, since this is a bug in the code; if a query with less than 20 candidates is sampled, the loop will continue and not yield any data whatsoever, causing the crash.

@Panda0406 , it would be great if you could provide the specific code for the results when you ran on the Wiki-ZS dataset, since the current code is not functional for the Wiki-ZS dataset.

from zero-shot-knowledge-graph-relational-learning.

Filco306 avatar Filco306 commented on September 14, 2024

I can further add that I have found several things hardcoded in the code, specifically for the NELL-dataset. Some examples are row 178, row 181 and row 623 in trainer.py

from zero-shot-knowledge-graph-relational-learning.

Panda0406 avatar Panda0406 commented on September 14, 2024

Sorry for my late reply. I have double-checked my code and realize that it is truly a bug. I think I did not catch this bug because of this query-randomly-selecting:
image

Please modify these codes in data_loader.py and try again.
image
to

for k in task_pool:
if len(rel2candidates[k]) <= 20:
v = 0
else:
v = min(len(rel2candidates[k]), 1000)
t_num.append(v)

Really sorry for this bug.

from zero-shot-knowledge-graph-relational-learning.

Filco306 avatar Filco306 commented on September 14, 2024

Hello @Panda0406 , I realize I sounded a bit harsh here. Sorry for that - I have managed to reproduce your results and everything looks fine :) thank you for a great paper!

from zero-shot-knowledge-graph-relational-learning.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.