Google Colab Update: PyMC3 is being replaced by PyMC v4 FAQ

Are you a PyMC3 user and a Google Colab user? This is the thread for you.

PyMC3 is being replaced by PyMC v4 in Colab

What will I need to do?

Ideally nothing, the PyMC v4 API is very similar to PyMC3. Most models should just work. You may need to just update your import statements from

import pymc3 as pm

to

import pymc as pm

Some extra tips are in this blog post as well.

What if I don’t want to change?

No problem! Google Colab makes it easy to customize your environment. Just run the two following commands and you’ll be back to the PPL version you’re looking for

!pip uninstall pymc
!pip install pymc3

Why should I migrate from PyMC3 to PyMC v4?

In short PyMC v4 is packed with a variety of new features and capabilities that will improve your Bayesian Workflow experience. This blog post from the team explains the benefits in more detail. We highly encourage users to upgrade

What if I have questions?

Feel free to ask here! We’ll be happy to help

8 Likes

There should be no need to uninstall pymc if a user wants to go with pymc3, they have different dependencies.

1 Like

Yessss!!! Thank you devs, been wondering when we would be able to use pymc4 in colab <3

@Blaise You can use PyMC V4 in colab right now with one manual step! And very soon It’ll soon become the default

2 Likes

Cool! Is there any additional step is we want to use Jax samplers with gpu? Thanks :blush:

Nope it works out of the box

2 Likes

Update, its live

1 Like