CogComp / saul

Saul : Declarative Learning-Based Programming
Other
64 stars 18 forks source link

Spatial Role labeling bug #487

Open alaeddineMoussa opened 6 years ago

alaeddineMoussa commented 6 years ago

Hello, I'm trying to run the Spatial Role labeling with Saul on stb, but I have the error listed below. I already tested with this manipulation but without success {Please train/test without SRL feature(actually the results reported are without this feature):

change this to : val JF2_12 = property(relations) { x: SpRelation =>"" } change this to TextAnnotationFactory.disableSettings(settings, USE_SRL_NOM, USE_NER_ONTONOTES, USE_SRL_VERB)}

Thanks for your help

Error


[error] Exception in thread "main" java.lang.NullPointerException [error] at edu.illinois.cs.cogcomp.saulexamples.nlp.SpatialRoleLabeling.SpRLSensors$.getIndicatorCandidates(SpRLSensors.scala:123) [error] at edu.illinois.cs.cogcomp.saulexamples.nlp.SpatialRoleLabeling.SpRLSensors$.sentencesToRelations(SpRLSensors.scala:32) [error] at edu.illinois.cs.cogcomp.saulexamples.nlp.SpatialRoleLabeling.SpRLDataModel$$anonfun$1.apply(SpRLDataModel.scala:31) [error] at edu.illinois.cs.cogcomp.saulexamples.nlp.SpatialRoleLabeling.SpRLDataModel$$anonfun$1.apply(SpRLDataModel.scala:31) [error] at edu.illinois.cs.cogcomp.saul.datamodel.edge.Edge$$anonfun$populateUsingFrom$1.apply(Edge.scala:79) [error] at edu.illinois.cs.cogcomp.saul.datamodel.edge.Edge$$anonfun$populateUsingFrom$1.apply(Edge.scala:78) [error] at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) [error] at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) [error] at edu.illinois.cs.cogcomp.saul.datamodel.edge.Edge$class.populateUsingFrom(Edge.scala:78) [error] at edu.illinois.cs.cogcomp.saul.datamodel.edge.AsymmetricEdge.populateUsingFrom(Edge.scala:124) [error] at edu.illinois.cs.cogcomp.saul.datamodel.node.Node$$anonfun$addInstance$2.apply(Node.scala:131) [error] at edu.illinois.cs.cogcomp.saul.datamodel.node.Node$$anonfun$addInstance$2.apply(Node.scala:131) [error] at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) [error] at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) [error] at edu.illinois.cs.cogcomp.saul.datamodel.node.Node.addInstance(Node.scala:131) [error] at edu.illinois.cs.cogcomp.saul.datamodel.node.Node$$anonfun$populate$1.apply(Node.scala:159) [error] at edu.illinois.cs.cogcomp.saul.datamodel.node.Node$$anonfun$populate$1.apply(Node.scala:159) [error] at scala.collection.immutable.List.foreach(List.scala:381) [error] at edu.illinois.cs.cogcomp.saul.datamodel.node.Node.populate(Node.scala:159) [error] at edu.illinois.cs.cogcomp.saulexamples.nlp.SpatialRoleLabeling.PopulateSpRLDataModel$.apply(PopulateSpRLDataModel.scala:26) [error] at edu.illinois.cs.cogcomp.saulexamples.nlp.SpatialRoleLabeling.SpRLApp$.delayedEndpoint$edu$illinois$cs$cogcomp$saulexamples$nlp$SpatialRoleLabeling$SpRLApp$1(SpRLApp.scala:45) [error] at edu.illinois.cs.cogcomp.saulexamples.nlp.SpatialRoleLabeling.SpRLApp$delayedInit$body.apply(SpRLApp.scala:24) [error] at scala.Function0$class.apply$mcV$sp(Function0.scala:34) [error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) [error] at scala.App$$anonfun$main$1.apply(App.scala:76) [error] at scala.App$$anonfun$main$1.apply(App.scala:76) [error] at scala.collection.immutable.List.foreach(List.scala:381) [error] at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35) [error] at scala.App$class.main(App.scala:76) [error] at edu.illinois.cs.cogcomp.saulexamples.nlp.SpatialRoleLabeling.SpRLApp$.main(SpRLApp.scala:24) [error] at edu.illinois.cs.cogcomp.saulexamples.nlp.SpatialRoleLabeling.SpRLApp.main(SpRLApp.scala) java.lang.RuntimeException: Nonzero exit code returned from runner: 1 at scala.sys.package$.error(package.scala:27) [trace] Stack trace suppressed: run last saulExamples/compile:run for the full output. [error] (saulExamples/compile:run) Nonzero exit code returned from runner: 1 [error] Total time: 733 s, completed 23 nov. 2018 22:15:47

kordjamshidi commented 6 years ago

You might miss some input files here. Please use this version of SpRL if you want to run this model, the information about the dependencies is in the ReadMe. Let me know if you have any problems in running this version: https://github.com/HLR/SpRL_TextOnly.

kordjamshidi commented 6 years ago

Since the data is small, it is all copied in the same repo: https://github.com/HLR/SpRL_TextOnly/tree/master/data/mSpRL

alaeddineMoussa commented 6 years ago

Thank you for your prompt reply, I tried to use this version of Saul because i would like to test the UTDSpRL systems, I have downloaded the corpus data, and i change the path for the corresponding directory. Even with the new version of SpRL, it doesn't run. I have an issue with Gurobi. I followed the installation steps, but it doesn't work; the version which Saul uses it 6.0 and the version which i found in the official site is 8.0. I tried to change the version in Saul from 6.0 to 8.0 in "built.stb "com.gurobi" % "gurobi" % "6.0" " without success. The following error appears : Multiple main classes detected, select one to run:

[1] edu.tulane.cs.hetml.nlp.sprl.TextOnly.PlainTextApp [2] edu.tulane.cs.hetml.nlp.sprl.TextOnly.SpRLApp

Enter number: 2

[info] Running edu.tulane.cs.hetml.nlp.sprl.TextOnly.SpRLApp SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/root/.ivy2/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/root/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] [error] (run-main-0) java.lang.UnsatisfiedLinkError: no GurobiJni60 in java.library.path java.lang.UnsatisfiedLinkError: no GurobiJni60 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at gurobi.GurobiJni.(GurobiJni.java:197) at gurobi.GRBEnv.(GRBEnv.java:16) at gurobi.GRBEnv.(GRBEnv.java:11) at edu.illinois.cs.cogcomp.infer.ilp.GurobiHook.(GurobiHook.java:84) at edu.illinois.cs.cogcomp.infer.ilp.GurobiHook.(GurobiHook.java:74) at edu.tulane.cs.hetml.nlp.sprl.TextOnly.TripletSentenceLevelConstraintClassifiers$.(TripletSentenceLevelConstraintClassifiers.scala:13) at edu.tulane.cs.hetml.nlp.sprl.TextOnly.TripletSentenceLevelConstraintClassifiers$.(TripletSentenceLevelConstraintClassifiers.scala) at edu.tulane.cs.hetml.nlp.sprl.TextOnly.TripletSentenceLevelConstraintClassifiers$TRConstraintClassifier$.(TripletSentenceLevelConstraintClassifiers.scala:25) at edu.tulane.cs.hetml.nlp.sprl.TextOnly.TripletSentenceLevelConstraintClassifiers$TRConstraintClassifier$.(TripletSentenceLevelConstraintClassifiers.scala) at edu.tulane.cs.hetml.nlp.sprl.TextOnly.SpRLApp$.delayedEndpoint$edu$tulane$cs$hetml$nlp$sprl$TextOnly$SpRLApp$1(SpRLApp.scala:38) at edu.tulane.cs.hetml.nlp.sprl.TextOnly.SpRLApp$delayedInit$body.apply(SpRLApp.scala:17) at scala.Function0$class.apply$mcV$sp(Function0.scala:34) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) at scala.App$$anonfun$main$1.apply(App.scala:76) at scala.App$$anonfun$main$1.apply(App.scala:76) at scala.collection.immutable.List.foreach(List.scala:381) at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35) at scala.App$class.main(App.scala:76) at edu.tulane.cs.hetml.nlp.sprl.TextOnly.SpRLApp$.main(SpRLApp.scala:17) at edu.tulane.cs.hetml.nlp.sprl.TextOnly.SpRLApp.main(SpRLApp.scala) 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) [trace] Stack trace suppressed: run last compile:run for the full output. java.lang.RuntimeException: Nonzero exit code: 1 at scala.sys.package$.error(package.scala:27) [trace] Stack trace suppressed: run last compile:run for the full output. [error] (compile:run) Nonzero exit code: 1 [error] Total time: 4 s, completed 25 nov. 2018 01:06:10

kordjamshidi commented 6 years ago

To my experience, this should be just a problem because you did not set your Environment variables for Gurobi. I don't think the version can make a problem as far as you have set the path to Gurobi correctly. if you are running this using an IDE, please note that you need to set the IDE's Env variables too.