# PyMC3 on Databricks: progress bar

**URL:** <https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021>\
**Category:** Questions\
**Tags:** bug\
**Created:** [March 17, 2021, 2:25pm UTC](https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021 "2021-03-17T14:25:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![evivo](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@evivo](https://discourse.pymc.io/u/evivo)\
**Post date:** [March 17, 2021, 2:25pm UTC](https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021/1 "2021-03-17T14:25:07Z")

</div>

Hello everybody…  
I am not sure if this is more of a question for the Databricks community or the PyMC3 one, but anyway… I’ve just tried to run my first pymc3 model on a Databricks notebook, and the pm.sample command does not show the progress bar… can anyone tell me if there is a way to show it?

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pymc3/original/2X/1/19db89ebd92aca7565b6b1dcf05d18f6d185cc94.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![colcarroll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/colcarroll/32/9_2.png) [@colcarroll](https://discourse.pymc.io/u/colcarroll)\
**Post date:** [March 17, 2021, 5:22pm UTC](https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021/2 "2021-03-17T17:22:38Z")

</div>

That’s interesting, and I’d guess better for the databricks community.

PyMC3 uses the `fastprogress` progressbar ([link](https://github.com/fastai/fastprogress)) – if you can’t run their examples in the notebook then it is _definitely_ better for the databricks community!

---

<div class="post-metadata">

**Author:** ![kkelly](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@kkelly](https://discourse.pymc.io/u/kkelly)\
**Post date:** [April 26, 2022, 8:19pm UTC](https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021/3 "2022-04-26T20:19:08Z")

</div>

@evivo did you find a solution to this?

---

<div class="post-metadata">

**Author:** ![evivo](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@evivo](https://discourse.pymc.io/u/evivo)\
**Post date:** [April 27, 2022, 7:03am UTC](https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021/4 "2022-04-27T07:03:33Z")

</div>

Unfortunately, no. I have checked that the `fastprogress` progressbar does not work either and I have posted a message in the databricks forum, no answer so far ☹

---

<div class="post-metadata">

**Author:** ![evivo](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@evivo](https://discourse.pymc.io/u/evivo)\
**Post date:** [May 26, 2022, 9:39am UTC](https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021/5 "2022-05-26T09:39:50Z")

</div>

Hello again,

since it does not seem that I will get an answer anytime soon, I would like to ask: is there, or would it be possible to have in a future release, an alternative way to visualize the progress?

For instance, by printing a message every n seconds or something like that…

Thank you

---

<div class="post-metadata">

**Author:** ![DanhPhan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/danhphan/32/4799_2.png) [@DanhPhan](https://discourse.pymc.io/u/DanhPhan)\
**Post date:** [May 26, 2022, 9:54am UTC](https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021/6 "2022-05-26T09:54:40Z")

</div>

Hi,

Could you share a small reproducable sample of codes?

I can then run that codes with the latest PyMC version on databrick and get back to you.

---

<div class="post-metadata">

**Author:** ![evivo](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@evivo](https://discourse.pymc.io/u/evivo)\
**Post date:** [May 26, 2022, 12:44pm UTC](https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021/7 "2022-05-26T12:44:24Z")

</div>

Thank you @DanhPhan …

Any code that defines a model and calls pm.sample() would do, for instance the one from this [gist](https://gist.github.com/basnijholt/de76e521b22cc79379c432754cba11a1)

```auto
import numpy as np
import matplotlib.pyplot as plt

np.random.seed(42)

true_m = 0.5
true_b = -1.3
true_σ = 0.3

x = np.sort(np.random.uniform(0, 5, 50))
y_true = true_b + true_m * x
y = y_true + true_σ * np.random.randn(len(x))

import pymc3 as pm

with pm.Model() as model:
    # Define the priors on each parameter.
    m = pm.Uniform("m", lower=-5, upper=5)
    b = pm.Uniform("b", lower=-5, upper=5)
    σ = pm.Uniform("σ", lower=0, upper=10)

    # Define the likelihood.
    pm.Normal("obs", mu=m * x + b, sd=σ, observed=y)

    # This is how you will sample the model.
    trace = pm.sample(draws=1000, tune=1000, chains=8, cores=24)

```

Thank you!

---

<div class="post-metadata">

**Author:** ![DanhPhan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/danhphan/32/4799_2.png) [@DanhPhan](https://discourse.pymc.io/u/DanhPhan)\
**Post date:** [May 30, 2022, 7:28am UTC](https://discourse.pymc.io/t/pymc3-on-databricks-progress-bar/7021/8 "2022-05-30T07:28:33Z")

</div>

Hi @evivo

I have run the codes in Databricks, and the results are similar like what you showed. It only show “running…” and the message at the end, without any progress bar.

This is the result using pymc3 version 3.11.4

 ![Capture1](https://canada1.discourse-cdn.com/flex036/uploads/pymc3/original/2X/1/1c5a70888f2bbffa2dabba917730f6a4d4e9a83d.png)

And this is the result using pymc v4 version 4.0.0b6

 ![Capture2](https://canada1.discourse-cdn.com/flex036/uploads/pymc3/original/2X/b/b024261e09c717bb58d146fcdc5e86c1f5c05bd4.png)

However, when I run this notebook in Microsoft Azure notebook, it works. We can see the progress bar as follow:

 ![Capture3](https://canada1.discourse-cdn.com/flex036/uploads/pymc3/original/2X/1/1d4dee3a2805abbc9449d3599905d268c95e7695.png)

So, it seems to me that the progress bar is not working on Databricks notebook yet.
