Development Branch Errors

19 views
Skip to first unread message

brandon willard

unread,
Jan 9, 2013, 12:32:36 PM1/9/13
to cognitiv...@googlegroups.com
Hello,

I noticed that you posted the release and development repos, and I've been very excited about trying the development changes.  However, I'm seeing these errors (in Eclipse):

  • Type mismatch: cannot convert from List<DefaultPair<? extends Vector,Integer>> to List<DefaultPair<Vector,Integer>> in gov-sandia-cognition-common-core/Test/gov/sandia/cognition/math/geometry/KDTreeTest.java
  • Bound mismatch: The type VectorElementThresholdCategorizer is not a valid substitute for the bounded parameter <DeciderType extends Categorizer<? super InputType,? extends CategoryType>> of the type DeciderLearner<InputType,OutputType,CategoryType,DeciderType> in gov-sandia-cognition-learning-core/Source/gov/sandia/cognition/learning/algorithm/tree/RandomSubVectorThresholdLearner.java
The rest of the errors appear to be of the same nature, or due to those failures.

Justin Basilico

unread,
Jan 9, 2013, 1:21:10 PM1/9/13
to cognitiv...@googlegroups.com
Hi Brandon,

What OS and version of Java are you running in Eclipse? I've noticed that some differences in the compiler between minor versions of Java can sometimes trigger these issues. Does it work for you if you build it through Ant?

Thanks,
Justin

brandon willard

unread,
Jan 9, 2013, 1:44:51 PM1/9/13
to cognitiv...@googlegroups.com
Yeah, it does build through Ant.

I'm running Eclipse JDT 3.9.0, Platform 4.3 (same with 4.2.1) run with

java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

The projects are built/run with the same jvm.

Justin Basilico

unread,
Jan 10, 2013, 12:45:27 AM1/10/13
to cognitiv...@googlegroups.com
Hmm, sounds like a discrepancy between the Eclipse internal compiler and the version you are using on the command line. While I did some work in the development version to support compiling in both 1.6 and 1.7, most of our development has been on 1.6. Is there some sort of mode you can turn on in Eclipse for a Java 1.6 mode or something?

I'll also try to reproduce the errors myself.

Thanks,
Justin

Justin Basilico

unread,
Jan 13, 2013, 9:58:12 PM1/13/13
to cognitiv...@googlegroups.com
Hi Brandon,

I was able to reproduce it with the latest version of Eclipse and Java 1.7. It looks like a difference with how the generics are being interpreted when doing some of the automatic inference. I changed the code so that it should compile in that case (and still compile in 1.6 as well).

Try pulling the latest version and let me know if that works for you or if you have any other issues.

Thanks,
Justin

brandon willard

unread,
Jan 14, 2013, 4:15:30 PM1/14/13
to cognitiv...@googlegroups.com
Works now, thanks!

brandon willard

unread,
Jan 22, 2013, 9:29:25 PM1/22/13
to cognitiv...@googlegroups.com
Also, to install a maven build I've had to perform the following steps:

This is because gpg gives errors and some of the tests are failing locally.
Is there something I'm missing regarding the gpg issues?
Otherwise, the failure was:
Failed tests: 
  testSample(gov.sandia.cognition.statistics.montecarlo.DirectSamplerTest): null

Justin Basilico

unread,
Jan 23, 2013, 11:46:34 PM1/23/13
to cognitiv...@googlegroups.com
Hi Brandon,

We mostly use the Ant build files. I setup the Maven ones to be able to publish them to Maven central to make it easier for people to pick up the Foundry via Maven or Ivy. I'm a little puzzled why the GPG stuff would be getting used, since I think it is used just for signing the jars for release. If you can disable it locally, it shouldn't impact anything else in the build setup. It is possible that there is some additional configuration needed to maybe only use GPG in certain cases.

Regarding the test failure, they seem to pass on my machine with Java 1.6. I'll try to see if I can reproduce it with a different configuration.

Thanks,
Justin

Justin Basilico

unread,
Feb 9, 2013, 12:57:34 AM2/9/13
to cognitiv...@googlegroups.com
I fixed some of the build files, which were out of date (needed to add the dependency on common data to learning core). It now works for me with both Ant and Maven on both Java 1.6 and 1.7, and even when I don't have GPG setup. I wasn't able to reproduce the same failed error that you are getting though. Can you try the new version and if there is still an error, then let me know more details on the specifics? It could be a spurious randomized test or some kind of rounding issue.

Thanks,
Justin

brandon willard

unread,
Feb 18, 2013, 7:29:44 PM2/18/13
to cognitiv...@googlegroups.com
I still have to remove GPG to install with maven, the learning-core issue is gone, and there is one failure in learning-core from the Monte Carlo DirectSampler tests (see here).  
The confidence interval in the test has values "0.673858098932311 0.6873011446918514 0.7007441904513919 0.95 100" and the estimated mean is 0.7308781907032909.

When run in isolation, the test passes, so it seems like something is carrying over.  I noticed that NUM_SAMPLES is static, and gets changed to 100 (from 1000) in ImportanceSamplerTest.  That seems like a cause for this error.

Otherwise, if the tests are run in the latest Eclipse with default settings, junit throws a warning like this
junit.framework.AssertionFailedError: No tests found in gov.sandia.cognition.learning.algorithm.gradient.GradientDescendableTestHarness
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:97)
        ...

Justin Basilico

unread,
Feb 22, 2013, 12:16:20 AM2/22/13
to cognitiv...@googlegroups.com
Oh, it makes sense that GPG is getting activated when you try to do a local publish, but it should build/publish locally fine without it.

A lot of our tests are somewhat randomized and thus have some small chance of failure on a bad seed. Most of them have fixed seeds so that they reproduce and don't fail. Its possible that we missed this one (or that there is a real error with it). If it runs fine on its own but not when run as a suite for you, it is possible it is using a shared random object between tests and we may need to make it test-specific or the like. I'll take a look at it.

With regards to the "no tests found", generally this is fixed by changing the pattern for matching class names to run unit tests. We use the convention of ending the class name with Test, so something like matching *Test.class should help work in Eclipse.

Thanks,
Justin


--
You received this message because you are subscribed to the Google Groups "Cognitive Foundry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cognitive-foun...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Justin Basilico

unread,
Feb 22, 2013, 12:29:17 AM2/22/13
to cognitiv...@googlegroups.com
Actually, looking deeper it seems like the seed is fixed, so I'm not sure why it happens to fail for you. I do notice that if I change the seed, it can make the test fail. In fact, if I change it to anything I've tried it fails; it only seems to work for a seed of 1.

Kevin, can you look into this? It seems like the direct monte carlo sampler is under-estimating the mean. If you drop the number of samples from 1000 to 100 it passes with other seeds, but that doesn't seem like a good sign that with 1000 samples it tends to break if you change the seed from like 1 to 1234 or something else. Is it a bug or a broken test?

Thanks,
Justin

Dixon, Kevin R

unread,
Feb 22, 2013, 6:20:14 AM2/22/13
to <cognitive-foundry@googlegroups.com>, cognitiv...@googlegroups.com
I'll try to take a look at it this afternoon. 

--
Kevin R. Dixon
Sandia National Laboratories
Critical Systems Security (05621)
MS0672, TA-I: 729/134
tel: (505) 284-5615
fax: (505) 284-3258


Reply all
Reply to author
Forward
0 new messages