-
Notifications
You must be signed in to change notification settings - Fork 700
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
Building from source failed tests that import random
#32
Comments
To be 100% clear, are you saying you booted a clean ubuntu 16 instance and it failed to build there? Or is this on an already customized machine? |
It is customised. And Python 2.7 was installed using Anaconda. |
To make it clearer, I put the path structure here.
And in
Through To test the hypothesis, simply importing
As you can see, it attempts to load the local |
I agree this is a problem. We have an internal bug tracking this. Probably we will just rename deepvariant/core/math.py to core_math.py or equivalent. I'll update this bug when the change is in internally and it'll show up in the next push of deepvariant to github. Note you can workaround this issue just like https://github.com/notoraptor/deepvariant/commit/15c2deb211672a8ba32c1cbe609d81e1a2b0fb74 |
Many thanks for pointing me to the workaround! Looking forward to the next push! |
A fix is in in google, renaming math.py to genomics_math.py, which should fix the problem. The next major push of functional changes to DeepVariant will include this update. |
The previous name (math.py) can shadow Python's standard math module in some open-source uses, so we rename it to be both clearer (it's genomics oriented math functions) and to avoid the shadowing. As part of this we remove one of our shadows (import math as py_math), which is nice. Addresses #32 and the workaround seen in https://github.com/notoraptor/deepvariant/commit/15c2deb211672a8ba32c1cbe609d81e1a2b0fb74. PiperOrigin-RevId: 181175216
On Ubuntu 16.04 TLS, I built it with Python 2.7 and tensorflow 1.4.1. It failed all tests that import random (e.g.
deepvariant/deepvariant/core/cloud_utils_test.py
). It turned out that inrandom.py
, it importsmath
, and it mistakingly imports themath.py
in/deepvariant/deepvariant/core/
, instead of from the standard library. Is there a fix?The text was updated successfully, but these errors were encountered: