cmu-phil / tetrad

Repository for the Tetrad Project, www.phil.cmu.edu/tetrad.
GNU General Public License v2.0
405 stars 111 forks source link

Bug in Algorithm Comparison #339

Closed MikeKonrad closed 8 years ago

MikeKonrad commented 8 years ago

When running test (Maven Projects: Tetrad Project (root) -> Lifecycle -> test), using TETRAD Algorithm Comparison in IntelliJ IDEA on my Windows 7 machine (but this also happens on Joe's Mac), all appears well at first glance but at about 95% through the Event Log output, while "Running edu.cmu.tetrad.cli.CausalCmdApplicationTest" (GFCI Continuous), a tetrad-lib.properties file cannot be read, triggering a Java null pointer exception. Excerpting from the Event Log:

GFCI Continuous (Wed, October 26, 2016 03:37:27 PM)

data = sim_data_20vars_100cases.csv delimiter = comma verbose = true thread = 8 alpha = 0.010000 penalty discount = 4.000000 max indegree = 100 faithfulness assumed = false ensure variable names are unique = true ensure variables have non-zero variance = true out = gfcic output-prefix = gfcic no-validation-output = false

2016-10-26 15:37:27 INFO AbstractAlgorithmCli:109 - === Starting GFCI Continuous: [snip] 2016-10-26 15:37:27 DEBUG LatestClient:41 - running version: null 2016-10-26 15:37:27 ERROR LatestClient:50 - Could not read tetrad-lib.properties file java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:434) at java.util.Properties.load0(Properties.java:353) at java.util.Properties.load(Properties.java:341) at edu.cmu.tetrad.latest.LatestClient.checkLatest(LatestClient.java:47) at edu.cmu.tetrad.cli.AbstractAlgorithmCli.run(AbstractAlgorithmCli.java:114) at edu.cmu.tetrad.cli.CausalCmdApplication.runAlgorithm(CausalCmdApplication.java:130) at edu.cmu.tetrad.cli.CausalCmdApplication.main(CausalCmdApplication.java:172) at edu.cmu.tetrad.cli.CausalCmdApplicationTest.testGfci(CausalCmdApplicationTest.java:101) [snip] Running version null but unable to contact version server. [end of excerpt]

And I don't know if this is also a bug or not, but after the suite of tests is exhausted, in spite of the null pointer exception noted above, the last line of the Event Log reads "Process finished with Exit Code 0."

jdramsey commented 8 years ago

Kevin, is this your code? Joe

kvb2univpitt commented 8 years ago

Yes, the causal-cmd is causing this. This error should not fail the test. Nevertheless, it still needs to be fixed. I will work on that.

kvb2univpitt commented 8 years ago

Fixed!

espinoj commented 8 years ago

This is my version checking code. Seems like in some configurations the property file is not able to referenced.

On Oct 27, 2016, at 9:08 AM, Joseph Ramsey notifications@github.com wrote:

Kevin, is this your code? Joe

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

MikeKonrad commented 8 years ago

Thank you, Kevin!

From: Kevin Bui [mailto:notifications@github.com] Sent: Thursday, October 27, 2016 11:10 AM To: cmu-phil/tetrad tetrad@noreply.github.com Cc: Michael Konrad mdk@sei.cmu.edu; Author author@noreply.github.com Subject: Re: [cmu-phil/tetrad] Bug in Algorithm Comparison (#339)

Closed #339https://github.com/cmu-phil/tetrad/issues/339.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/cmu-phil/tetrad/issues/339#event-838754733, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJHPPv1Fg5uytPS2g8oGQ0kZZuV-O2sdks5q4L7kgaJpZM4KiTcv.