Skip to content

Bug in rejection sampler? #334

Description

@dwadden

Hi,
I'm not a contributor, but I'm a member of MIT's Venture team. I'm trying to do some comparisons of BLOG and Venture on open-universe problems. I'm using the latest version of BLOG downloaded from the GitHub website. When I download the pre-build version, unzip the directory and enter, I get the following error:


(dw)$ bin/blog example/poisson-ball.blog -s blog.sample.RejectionSampler
Using fixed random seed for repeatability.
............................................
Constructing inference engine of class blog.engine.SamplingEngine
Constructing sampler of class blog.sample.RejectionSampler
Evidence: [ObsColor(Draw[0]) = Blue, ObsColor(Draw[1]) = Green, ObsColor(Draw[2]) = Blue, ObsColor(Draw[3]) = Green, ObsColor(Draw[4]) = Blue, ObsColor(Draw[5]) = Green, ObsColor(Draw[6]) = Blue, ObsColor(Draw[7]) = Green, ObsColor(Draw[8]) = Blue, ObsColor(Draw[9]) = Green]
Query: [/*DerivedVar*/ size({b for Ball b : true})]
Running for 10000 samples...
Query Reporting interval is 10000
Exception in thread "main" java.lang.NullPointerException
    at blog.sample.RejectionSampler.nextSample(RejectionSampler.java:183)
    at blog.engine.SamplingEngine.answerQueries(SamplingEngine.java:168)
    at blog.Main.run(Main.java:190)
    at blog.Main.main(Main.java:153)
(dw)$ 

The default likelihood-weighting sampler runs with no problem, and the rejection sampler seemed to work ok with a couple other examples I tried. Is there any reason rejection sampling doesn't work well with the poisson ball example in particular?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions