Skip to content

Conversation

@smutch
Copy link
Contributor

@smutch smutch commented Jan 12, 2026

Running in the most recent release of Marimo results in the following error:

Error in progress callback: ModuleNotFoundError: No module named 'marimo._messaging.ops'

This is due to a recent refactor in Marimo's messaging module, renaming marimo._messaging.ops.CellOp to marimo._messaging.notification_utils.CellNotificationUtils.

This PR gets nutpie progress reporting working in Marimo again.

@aseyboldt
Copy link
Member

@smutch Sorry for the late reply, I've been quite busy for a while...

Thanks for looking into this. Do you think we could implement this in a way that the progressbar also still works on old marimo versions for a while?

The test failures are due to the pandas 3.0 change, and should go away with a rebase. If you are busy, I can also take care of that myself though.

@smutch
Copy link
Contributor Author

smutch commented Feb 1, 2026

No worries at all!

Thanks for looking into this. Do you think we could implement this in a way that the progressbar also still works on old marimo versions for a while?

Of course. Sorry - I should have made the fix backwards compatible originally. I'll rebase and add backwards compatibility.

@smutch smutch force-pushed the fix-marimo_progress branch from b7f2465 to 1c2dc26 Compare February 1, 2026 23:36
@smutch
Copy link
Contributor Author

smutch commented Feb 1, 2026

I've updated the PR to also work with marimo < 0.19.0 and rebased against main.

I've tested the fix with the following marimo notebook:

import marimo

__generated_with = "0.19.7"
app = marimo.App(width="medium")


@app.cell
def _():
    import marimo as mo
    import pymc as pm
    import nutpie
    return nutpie, pm


@app.cell
def _(nutpie, pm):
    with pm.Model() as model:
        mu = pm.Normal("mu", mu=0, sigma=1)
        sigma = pm.HalfNormal("sigma", sigma=1)
        obs = pm.Normal("obs", mu=mu, sigma=sigma, observed=[1.0, 2.0, 3.0])

        nutpie.sample(nutpie.compile_pymc_model(model), draws=100_000)
    return


if __name__ == "__main__":
    app.run()

Run using:

uv run --with 'marimo <0.19.0' marimo edit test.py

and

uv run --with 'marimo >=0.19.0' marimo edit test.py

Please note that I also had to update the python dependency in pyproject.toml to requires-python = ">=3.11" when running these tests with uv. There is a nutpie dependency on zarr >= 3.1.0 which requires python >= 3.11. I have not included the minimum python version bump in this PR as I thought that would probably be something you would want to tackle separately.

@aseyboldt
Copy link
Member

Great, thank you!
I'll bump to python 3.11 separately.

@aseyboldt aseyboldt merged commit fb76ad7 into pymc-devs:main Feb 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants