Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ILP inference fails when classifier is loaded from model files #108

Open
Slash0BZ opened this issue Oct 22, 2017 · 3 comments
Open

ILP inference fails when classifier is loaded from model files #108

Slash0BZ opened this issue Oct 22, 2017 · 3 comments

Comments

@Slash0BZ
Copy link
Member

I have an ILP Inference classifier that relies on a base classifier. When the classifier is initialized and trained, the ILP inference classifier works fine.

However, if I initialize the base classifier with a model file and a lexicon file that are pre-trained, the ILP classifier gives me an error LBJava ERROR: Classifier relation_classifier did not return any scores. ILP inference cannot be performed.

The error message is produced from https://github.com/CogComp/lbjava/blob/434cf0a40e4f2ae08c96d3ae1b96f319eb531d67/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/infer/ILPInference.java#L173-#L174

@Slash0BZ
Copy link
Member Author

I have found a solution.

Instead of using classifier a = new classifier(model, lexicon), Using

classifier a = new classifier();
a.readLexicon(lexicon);
a.readModel(model);

solves the issue.

I still think it's a design issue.

@danyaljj
Copy link
Member

danyaljj commented Oct 22, 2017

Yeah sounds like a bug. Were you able to where is the constructor you're calling? (why different behaviors emerge with different inputs?)

@Slash0BZ
Copy link
Member Author

I briefly tried to find a difference and I believe the only difference is isClone is set to false in the second way (the working one), and set to true in the buggy one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants