CogComp / illinois-sl

A general-purpose Java library for performing structured learning.
Other
22 stars 10 forks source link

Exception in reranking #4

Closed narendergupta closed 8 years ago

narendergupta commented 8 years ago

I tried running the reranking script on my own data (from command line) and it threw and exception. Here is the log:

./scripts/run_reranking.sh trainRankingModel ~/gitlab/illinois-grad-admissions/data/ranking_illinoissl/train.dat config/StructuredPerceptron.config  rankModel
584 [main] INFO edu.illinois.cs.cogcomp.sl.learner.structured_perceptron.StructuredPerceptron - Starting Structured Perceptron learner
585 [main] INFO edu.illinois.cs.cogcomp.sl.learner.structured_perceptron.StructuredPerceptron - Starting epoch 0
ERROR:
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at edu.illinois.cs.cogcomp.core.utilities.commands.InteractiveShell.runCommand(InteractiveShell.java:150)
    at edu.illinois.cs.cogcomp.sl.applications.reranking.MainClass.main(MainClass.java:96)
Caused by: java.lang.AssertionError
    at edu.illinois.cs.cogcomp.sl.applications.reranking.RankingInferenceSolver.getLossAugmentedBestStructure(RankingInferenceSolver.java:52)
    at edu.illinois.cs.cogcomp.sl.learner.structured_perceptron.StructuredPerceptron.doOneIteration(StructuredPerceptron.java:170)
    at edu.illinois.cs.cogcomp.sl.learner.structured_perceptron.StructuredPerceptron.train(StructuredPerceptron.java:106)
    at edu.illinois.cs.cogcomp.sl.learner.structured_perceptron.StructuredPerceptron.train(StructuredPerceptron.java:77)
    at edu.illinois.cs.cogcomp.sl.applications.reranking.MainClass$AllTest.trainRankingModel(MainClass.java:49)
    ... 6 more
Documentation
trainRankingModel trainingDataPath ConfigFilePath modelPath

This experiment took 0.702 secs

Any ideas why it might be happening?

shyamupa commented 8 years ago

Seems like the example you gave fore reranking did not have any items to rerank in the feature list here. Which is why your max_item remained -1. Can you check your data?