ashokpant / dkpro-tc

Automatically exported from code.google.com/p/dkpro-tc
Other
0 stars 0 forks source link

Demos #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by ivan.hab...@gmail.com on 6 Jun 2014 at 7:54

GoogleCodeExporter commented 9 years ago
Sorry, hit enter key randomly while writing the title...

Title: Demos (TwentyNewsgroupsDemo, TwitterSentimentDemo) broken

1. Checkout the trunk source
2. Run either of these

Exception in thread "main" 
de.tudarmstadt.ukp.dkpro.lab.engine.ExecutionException: 
de.tudarmstadt.ukp.dkpro.lab.engine.ExecutionException: 
java.lang.IllegalStateException: Requested [3] folds, but only got [0] values. 
There must be at least as many values as folds.
    at de.tudarmstadt.ukp.dkpro.lab.engine.impl.ExecutableTaskEngine.run(ExecutableTaskEngine.java:68)
    at de.tudarmstadt.ukp.dkpro.lab.engine.impl.DefaultTaskExecutionService.run(DefaultTaskExecutionService.java:48)
    at de.tudarmstadt.ukp.dkpro.lab.Lab.run(Lab.java:97)
    at de.tudarmstadt.ukp.dkpro.tc.examples.single.document.TwentyNewsgroupsDemo.runCrossValidation(TwentyNewsgroupsDemo.java:135)
    at de.tudarmstadt.ukp.dkpro.tc.examples.single.document.TwentyNewsgroupsDemo.main(TwentyNewsgroupsDemo.java:61)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: de.tudarmstadt.ukp.dkpro.lab.engine.ExecutionException: 
java.lang.IllegalStateException: Requested [3] folds, but only got [0] values. 
There must be at least as many values as folds.
    at de.tudarmstadt.ukp.dkpro.lab.engine.impl.ExecutableTaskEngine.run(ExecutableTaskEngine.java:68)
    at de.tudarmstadt.ukp.dkpro.lab.task.impl.BatchTask.execute(BatchTask.java:207)
    at de.tudarmstadt.ukp.dkpro.tc.weka.task.BatchTaskCrossValidation.execute(BatchTaskCrossValidation.java:212)
    at de.tudarmstadt.ukp.dkpro.lab.engine.impl.ExecutableTaskEngine.run(ExecutableTaskEngine.java:55)
    ... 9 more
Caused by: java.lang.IllegalStateException: Requested [3] folds, but only got 
[0] values. There must be at least as many values as folds.
    at de.tudarmstadt.ukp.dkpro.lab.task.impl.FoldDimensionBundle.init(FoldDimensionBundle.java:116)
    at de.tudarmstadt.ukp.dkpro.lab.task.impl.FoldDimensionBundle.rewind(FoldDimensionBundle.java:147)
    at de.tudarmstadt.ukp.dkpro.lab.task.ParameterSpace$ParameterSpaceIterator.step(ParameterSpace.java:151)
    at de.tudarmstadt.ukp.dkpro.lab.task.ParameterSpace$ParameterSpaceIterator.<init>(ParameterSpace.java:142)
    at de.tudarmstadt.ukp.dkpro.lab.task.ParameterSpace.iterator(ParameterSpace.java:125)
    at de.tudarmstadt.ukp.dkpro.lab.task.impl.BatchTask.execute(BatchTask.java:146)
    at de.tudarmstadt.ukp.dkpro.tc.weka.task.BatchTaskCrossValidation$1.execute(BatchTaskCrossValidation.java:143)
    at de.tudarmstadt.ukp.dkpro.lab.engine.impl.ExecutableTaskEngine.run(ExecutableTaskEngine.java:55)
    ... 12 more

Not sure if it's a bug in TC or LAB...

Best,

Ivan

Original comment by ivan.hab...@gmail.com on 6 Jun 2014 at 7:57

GoogleCodeExporter commented 9 years ago
I just ran the examples on my machine without problems.

I have seen this exception before when no documents could be found by the 
reader.
In my case, the logging output says:
"INFO: Found [16] resources to be read"

In your case, does it say "[0]"?
In this case, the input data is not found which might indicate some 
configuration problem in your project.

Original comment by torsten....@gmail.com on 6 Jun 2014 at 8:06

GoogleCodeExporter commented 9 years ago
Thanks, so the problem really was a wrong working directory. Maybe the 
experiment should fail sooner if there are no instances. For example, if I run 
TwentyNewsgroupsRaw, it fails with:

Information: Found [0] resources to be read
Exception in thread "main" 
org.apache.uima.analysis_engine.AnalysisEngineProcessException
    at de.tudarmstadt.ukp.dkpro.tc.core.task.uima.ExtractFeaturesConnector.collectionProcessComplete(ExtractFeaturesConnector.java:139)
    at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.collectionProcessComplete(PrimitiveAnalysisEngine_impl.java:331)
    at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.collectionProcessComplete(AggregateAnalysisEngine_impl.java:336)
    at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:88)
    at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:115)
    at de.tudarmstadt.ukp.dkpro.tc.examples.raw.TwentyNewsgroupsRaw.main(TwentyNewsgroupsRaw.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.IllegalArgumentException: List of instance outcomes is 
empty.
    at de.tudarmstadt.ukp.dkpro.tc.weka.util.WekaUtils.instanceListToArffFile(WekaUtils.java:223)
    at de.tudarmstadt.ukp.dkpro.tc.weka.writer.WekaDataWriter.write(WekaDataWriter.java:26)
    at de.tudarmstadt.ukp.dkpro.tc.core.task.uima.ExtractFeaturesConnector.collectionProcessComplete(ExtractFeaturesConnector.java:136)
    ... 10 more

Which gives me a clear advice that I'm doing something wrong. That was not 
clear from the stacktrace in the previous case.

Original comment by ivan.hab...@gmail.com on 6 Jun 2014 at 11:11

GoogleCodeExporter commented 9 years ago
Good that this has been resolved.

I agree that experiments should fail with a meaningful exception if no input 
documents are found.

Could you open a new issue for that?

Original comment by torsten....@gmail.com on 6 Jun 2014 at 11:39

GoogleCodeExporter commented 9 years ago

Original comment by daxenber...@gmail.com on 13 Jun 2014 at 3:18

GoogleCodeExporter commented 9 years ago

Original comment by daxenber...@gmail.com on 13 Jun 2014 at 3:23