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

Compilation error workaround #3767

Merged
merged 2 commits into from
Jan 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions pymc3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
from .distributions import transforms
from .glm import *
from . import gp
from .math import logaddexp, logsumexp, logit, invlogit, expand_packed_triangular, probit, invprobit
from .math import (
logaddexp,
logsumexp,
logit,
invlogit,
expand_packed_triangular,
probit,
invprobit,
)
from .model import *
from .model_graph import model_to_graphviz
from . import ode
Expand All @@ -29,8 +37,24 @@

from .data import *


def __set_compiler_flags():
# Workarounds for Theano compiler problems on various platforms
import platform
import theano

system = platform.system()
if system == "Windows":
theano.config.mode = "FAST_COMPILE"
elif system == "Darwin":
theano.config.gcc.cxxflags = "-Wno-c++11-narrowing"


__set_compiler_flags()

import logging
_log = logging.getLogger('pymc3')

_log = logging.getLogger("pymc3")
if not logging.root.handlers:
_log.setLevel(logging.INFO)
if len(_log.handlers) == 0:
Expand Down