Skip to content
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

pytest fails in float32 #4750

Closed
larryshamalama opened this issue Jun 7, 2021 · 1 comment
Closed

pytest fails in float32 #4750

larryshamalama opened this issue Jun 7, 2021 · 1 comment

Comments

@larryshamalama
Copy link
Member

Following my (slow and steady) progress here, check_logcdf in test_distributions.py seems to be having issues only in float32. Below is a summary of the issue in code.

import aesara
import pymc3 as pm
import scipy.stats.distributions as sp

# scipy reference
print(sp.chi2.logcdf(0.01, 100))
# output: -413.39853723533787

# float64
with pm.Model() as model:
    print(pm.ChiSquared.logcdf(0.01, 100).eval())
# output: -413.39853723533787

# float32
aesara.config.floatX = "float32"
with pm.Model() as model:
    print(pm.ChiSquared.logcdf(0.01, 100).eval())
# output: -inf

notebook available here

Happy to hear any pointers or suggestions!

@larryshamalama
Copy link
Member Author

Solved. This is apparently normal in float32. Thanks, once again, to @ricardoV94 :')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant