-
Notifications
You must be signed in to change notification settings - Fork 179
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
ZeroDivisionError in anneal.py #40
Comments
@terrycojones Can you share a small python script to recreate it? |
Hi @perrygeo Unfortunately it's not so easy to get you a failing example. My code loads a ton of sensitive data and it's not simple to make a failing case. I get this error regularly, so this is definitely not a one-off issue. I just had one tonight and I've had dozens of them in a recent set of runs. At the moment I'm so busy that instead of digging in further I just restart the runs. Anyway, I would like to help figure this out & realize I'm not really helping that the moment! I am out here, though :-) |
I just spent a bit more time looking and playing around with bits of code. I don't think T = self.Tmax * math.exp(Tfactor * step / self.steps) If In [74]: exp(-1000) == 0.0
Out[74]: True That results in We're clearly dealing with some corner case here. I'm trying some fractions to get myself a large In [90]: log(1e205 / 1e-100)
Out[90]: 702.288453363184 I can't get it higher than that just in mucking around. But an infinite value gets us the problem: In [92]: log(1e205 / 1e-105)
Out[92]: inf
In [98]: exp(-log(1e205 / 1e-105)) == 0.0
Out[98]: True So So In [104]: -log(1e-300)
Out[104]: 690.7755278982137 All this would imply that OK, leaving this here for now..... Thanks! |
I printed out the schedule I get back from some failing runs:
|
I'm not sure how this can happen, but I'm looking at it in my terminal output, so I can at least say that it did happen!
So it seems
T=0
, which, from code about 10 lines above, would mean thatself.Tmax
would need to be zero. I'm running using theauto
method andset_schedule
. So maybe whenauto
setsTmax
to be the result of runninground_figures
the value is zero?The text was updated successfully, but these errors were encountered: