-
Notifications
You must be signed in to change notification settings - Fork 30
solving PF memory growth issue #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
LWSampler. But LWSampler doesnot need CBN information.
@@ -895,12 +901,15 @@ private void updateParentsAndProbs(VarInfoUpdater updater) { | |||
BayesNetVar var = (BayesNetVar) iter.next(); | |||
if ((var instanceof BasicVar) && (basicVarToValue.get(var) == null)) { | |||
// var has been uninstantiated | |||
cbn.removeNode(var); | |||
varToLogProb.remove(var); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lileicc Why do you want to remove this line? (About varToLogProb)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since I already put it in setValue(...)
when value is null, I already put varToLogProb.remove(var)
.
@datang1992 |
@datang1992 @jxwuyi |
@datang1992 |
OK. If we don't allow PF for OU models, then it LGTM. |
@@ -104,7 +104,7 @@ | |||
*/ | |||
public WorldInProgress(Model model, Evidence evidence, int intBound, | |||
int depthBound, int timestepBound) { | |||
super(Collections.EMPTY_SET); | |||
super(Collections.EMPTY_SET, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@datang1992 @lileicc Why record object is necessary in Gibbs and MH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exact answer is complicated. It is one way to record the usage graph.
Overall LGTM |
solving PF memory growth issue, disable CBN recording objects in LWSampler and ParticleFilter
disable the use of CBN in DefaultPossibleWorld, which is used in PF and LWSampler. But LWSampler doesnot need CBN information.
@jxwuyi @datang1992