{ "cells": [ { "cell_type": "markdown", "id": "3e991cb4", "metadata": {}, "source": [ "(v4_announcement)=\n", "\n", "# PyMC 4.0 Release Announcement\n", ":::{post} June 6, 2022\n", ":tags: release, aesara, jax\n", ":category: news\n", ":author: Thomas Wiecki\n", ":::\n", "\n", "We, the PyMC core development team, are incredibly excited to announce the release of a major rewrite of PyMC3 (now called just PyMC): `4.0`. Internally, we have already been using PyMC 4.0 almost exclusively for many months and found it to be very stable and better in every aspect. Every user should upgrade, as there are many exciting new updates that we will talk about in this and upcoming blog posts.\n", "\n", ":::{figure-md} versions_diagram\n", "\n", "![Diagram of the PyMC version history](pymc_versions.png)\n", "\n", "Graphic by [Ravin Kumar](https://twitter.com/canyon289)\n", "\n", ":::\n", "\n", "## Full API compatibility for model building\n", "To get the main question out of the way: Yes, you can just keep your existing PyMC modeling code without having to change anything (in most cases) and get all the improvements for free. The only thing most users will have to change is the import from `import pymc3 as pm` to `import pymc as pm`. For more information, see the [quick migration guide](https://www.pymc-labs.io/blog-posts/the-quickest-migration-guide-ever-from-pymc3-to-pymc-v40/). If you are using more advanced features of PyMC beyond the modeling API, you might have to change some things.\n", "\n", "## It's now called PyMC instead of PyMC3\n", "First, the biggest news: **PyMC3 has been renamed to PyMC. PyMC3 version 3.x will stay under the current name to not break production systems but future versions will use the PyMC name everywhere.** While there were a few reasons for this, the main one is that PyMC3 4.0 looks quite confusing.\n", "\n", "## Theano → Aesara\n", "While evaluating other tensor libraries like `TensorFlow` and `PyTorch` as new backends we realized how amazing and unique `Theano` really was. It has a mature and hackable code base and a simple graph representation that allows easy graph manipulations, something that's very useful for probabilistic programming languages. In addition, `TensorFlow` and `PyTorch` focus on a dynamic graph which is useful for some things, but for a probabilistic programming package, a static graph is actually much better, and `Theano` is the only library that provided this.\n", "\n", "So, we went ahead and forked the `Theano` library and undertook a massive cleaning up of the code-base (this charge was led by [Brandon Willard](https://twitter.com/brandontwillard)), removing swaths of old and obscure code, and restructuring the entire library to be more developer friendly.\n", "\n", "This rewrite motivated renaming the package to [`Aesara`](https://github.com/aesara-devs/aesara) (Theano's daughter in Greek mythology). Quickly, a new developer team focused around improving `aesara` independent of `PyMC`.\n", "\n", "## What's new in PyMC 4.0?\n", "\n", "Alright, let's get to the good stuff. What makes PyMC 4.0 so awesome?\n", "