Skip to content

Commit 7d50de8

Browse files
authored
add legacy messages (#7338)
1 parent ed74406 commit 7d50de8

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
|Build Status| |Coverage| |NumFOCUS_badge| |Binder| |Dockerhub|
77

8+
.. warning::
9+
This is the legacy version of PyMC3, now renamed to PyMC.
10+
If you are looking for the latest version of PyMC, please visit
11+
`PyMC's documentation <https://www.pymc.io/welcome.html>`__
12+
13+
814
PyMC3 is a Python package for Bayesian statistical modeling and Probabilistic Machine Learning
915
focusing on advanced Markov chain Monte Carlo (MCMC) and variational inference (VI)
1016
algorithms. Its flexibility and extensibility make it applicable to a

pymc3/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
handler = logging.StreamHandler()
5353
_log.addHandler(handler)
5454

55+
_log.warning("The version of PyMC you are using is very outdated.\n\nPlease upgrade to the latest "
56+
"version of PyMC https://www.pymc.io/projects/docs/en/stable/installation.html\n\n"
57+
"Also notice that PyMC3 has been renamed to PyMC."
58+
)
5559

5660
def _check_backend_version():
5761
backend_paths = theano.__spec__.submodule_search_locations

pymc3/sampling.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,16 @@ def sample(
434434
mean sd hdi_3% hdi_97%
435435
p 0.609 0.047 0.528 0.699
436436
"""
437+
_log.info("The version of PyMC you are using is very outdated.\n\nPlease upgrade to the latest "
438+
"version of PyMC https://www.pymc.io/projects/docs/en/stable/installation.html\n\n"
439+
"Also notice that PyMC3 has been renamed to PyMC."
440+
)
441+
437442
# Handle deprecated/forwards-compatible kwargs
438443
if initvals is not None:
439444
start = initvals
440445

446+
441447
model = modelcontext(model)
442448
start = deepcopy(start)
443449
if start is None:

0 commit comments

Comments
 (0)