-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Compilation error workaround #3767
Compilation error workaround #3767
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3767 +/- ##
=======================================
Coverage 90.63% 90.63%
=======================================
Files 133 133
Lines 20328 20328
=======================================
Hits 18424 18424
Misses 1904 1904 |
pymc3/__init__.py
Outdated
@@ -28,9 +36,18 @@ | |||
from .tests import test | |||
|
|||
from .data import * | |||
import theano |
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.
This looks good to go, but I would wrap the whole thing in a mangled function, so that the top-level namespace does not get too busy.
def __set_theano_flags():
import theano
import platform
...
__set_theano_flags()
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.
That's a good idea.
It doesn't feel great setting flags by default, but it seems like this is what's needed to get the project to work. A quick search shows that there were at least 3 issues in the last 4 months that this would have fixed. |
Given that we can't do much with Theano, its probably the best course of action. |
Compilation error workaround (pymc-devs#3767)
Inspired by PyMC3 workaround: pymc-devs/pymc#3767
The renames do not affect the API, except for `concatenate_not_none`, where the rename actually makes the code agree to the existing documentation. The existing variable names caused errors after an update of Pycodestyle in Flake8: #464 PyCQA/pycodestyle#853 https://gitlab.com/pycqa/flake8/-/merge_requests/418 Also add a workaround for a Theano compilation error, inspired by PyMC3: pymc-devs/pymc#3767
This applies platform-specific flags (for Mac and Windows) to circumvent compilation errors for certain models.
Closes #3695