-
Notifications
You must be signed in to change notification settings - Fork 31
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
Rare issue with ValueError and AssertionError #79
Comments
Strange, I am not sure how that can happen! What's the dimensionality of your inference problem? Maybe the debug.log is insightful if you store to a log_dir? show_status=True may also show you how the number of live points changes One issue is that if the likelihood values are exactly the same, then correct nested sampling (a relative new development) needs to remove these without replacement. So if you have likelihood plateaus, you can run out of live points. The latest ultranest version (3.5.7, you already use it apparently) tries to circumvent this at the beginning of the run, by filling in as many until you have min_num_live_points unique ones. But for later in the run this does not work. Maybe you can print out the likelihoods returned during the run to see if that helps debugging. If the NN returns exactly the same value, you may have to add some tie-breaker. |
Between 1 and 5, depending on the exact model that I am evaluating.
Good point! I am indeed seeing a lot of:
So you were definitely onto something! However, also get those for cases where the run succeeds. Could this have something to do with the |
yes, I suspect so. |
Description
I am using Ultranest to run a maximum likelihood estimation on a somewhat complicated likelihood function (essentially the MSE of a small trained neural net on some real data; hence it is tricky to provide a full minimal example). In 99% of cases, this works very well, but occasionally, I get some combination of the following errors / warnings:
The first two seem to boil down to
nlive
becoming zero at some point?Interestingly, in some cases, I can "fix" the problem by restarting with a different random seed, but "keep retrying until it works" does not strike me as a very principled solution.
Edit: It seems that increasing the number of live points can also help to mitigate the problem.
What I Did
My setup is relatively simple:
where I use the following prior and likelihood (the latter is slightly simplified):
I know that this may be all a bit vague, but any ideas / suggestions for how to debug this further would be greatly appreciated! 🙂
The text was updated successfully, but these errors were encountered: