Bug? Assertion fails when relevance reasoning disabled

The engine.
Post Reply
jonnie
Posts: 41
Joined: Mon Feb 06, 2012 12:49 pm

Bug? Assertion fails when relevance reasoning disabled

Post by jonnie »

Hello,
I stumbled upon my next crash :) I hope it's not a bug again since I haven't seen any fixes for the previous two I submitted :oops:
So I used plain Lauritzen and I have some evidences and targets set. I disable relevance reasoning with DSL_network::DeactivateRelevance() and then call UpdateBeliefs() - which is where the program crashes and this assertion gets printed:
Assertion failed: (idx >= 0) && (idx < size), file d:\shooltz\dsl\genie2\smile\fastarray.h, line 73
Otoh, if I don't DeactivateRelevance(), then UpdateBeliefs() runs fine.
I wanted to reproduce it in GeNIe but I don't know how to DeactivateRelevance() in the gui. As far as I understand, it's not possible...
Can you developers tell me what it is or do I have to send the network in again?
(Maybe it's interesting for you to know that the non-evidence nodes are all deterministic ones...)
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by shooltz[BayesFusion] »

jonnie wrote:Can you developers tell me what it is or do I have to send the network in again?
Send it again only if it's different from the one you've already sent :)
orzech
Posts: 51
Joined: Wed Aug 04, 2010 11:40 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by orzech »

According to the last post here: http://genie.sis.pitt.edu/forum/viewtopic.php?f=2&t=928
you cannot DeactivateRelevance() from GeNIe.

Cheers
orzech
Posts: 51
Joined: Wed Aug 04, 2010 11:40 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by orzech »

Anyways, have you considered out of memory exceptions? Unfortunately it's not easy to check if SMILE runs out of memory.
jonnie
Posts: 41
Joined: Mon Feb 06, 2012 12:49 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by jonnie »

Hi orzech,
I've isolated the failing case and wrote a function that does nothing else than applying the case and crash. Plus, I'm sitting on 8GB ram here ;)
orzech
Posts: 51
Joined: Wed Aug 04, 2010 11:40 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by orzech »

Ok :) Remember that if you use jSmile the memory is managed by virtual machine, thus you would need to manually increase heap space.
jonnie
Posts: 41
Joined: Mon Feb 06, 2012 12:49 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by jonnie »

I'm using C++ directly, and I've seen in the task manager that the program does use the whole ram when I'm just generating enough test cases... so it's definitely not an out-of-memory issue.

Btw I noticed that the assertion also fails when my relevance flags are set like this:
SetRelevanceLevelFlags(DSL_RELEVANCE_EVIDENCE_SET || DSL_RELEVANCE_EVIDENCE_CLEARED || DSL_RELEVANCE_PROPAGATED_EVIDENCE_SET || DSL_RELEVANCE_PROPAGATED_EVIDENCE_CLEARED || DSL_RELEVANCE_GENERAL_CHANGE)
And all the evidence nodes are root nodes, and most other nodes have propagated evidence, so only a few nodes remain to be computed by the algorithm. But still it fails :P
I'd be very thankful for any information on this issue since it's stopping my show at the moment... thanks
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by shooltz[BayesFusion] »

jonnie wrote:I'm using C++ directly, and I've seen in the task manager that the program does use the whole ram when I'm just generating enough test cases... so it's definitely not an out-of-memory issue.
I was able to reproduce the problem. The bug is in quite old code, but I'll be able to fix it. Expect new SMILE builds early next week.
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by marek [BayesFusion] »

Jonnie,

Thanks a lot for this bug report. We will fix it and let you know as soon as we have done so. In the meantime, let me offer you a small token of our gratitude -- a DSL t-shirt. If you tell me your size and send me your mailing address (you can send these to my personal Email address, marek@sis.pitt.edu), I will make sure that it is sent to you.
Cheers,

Marek
jonnie
Posts: 41
Joined: Mon Feb 06, 2012 12:49 pm

Post by jonnie »

Too much honor! I can't wait to see it :D
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by shooltz[BayesFusion] »

New GeNIe binaries with a fix for this problem are available now. Additionally, the program options include 'Deactivate Relevance' under Network|Algorithm.

I'll be rolling out new SMILE builds later today.
jonnie
Posts: 41
Joined: Mon Feb 06, 2012 12:49 pm

Re: Bug? Assertion fails when relevance reasoning disabled

Post by jonnie »

jonnie wrote: Btw I noticed that the assertion also fails when my relevance flags are set like this:
SetRelevanceLevelFlags(DSL_RELEVANCE_EVIDENCE_SET || DSL_RELEVANCE_EVIDENCE_CLEARED || DSL_RELEVANCE_PROPAGATED_EVIDENCE_SET || DSL_RELEVANCE_PROPAGATED_EVIDENCE_CLEARED || DSL_RELEVANCE_GENERAL_CHANGE)
Haha yeah that was logical OR, not bitwise OR! Silly me...
The expression equals 1 which equals DSL_RELEVANCE_ARC_ADDED ;)
Post Reply