Get help from the marimo community

Updated last month

Unable to show CatBoost widgets

At a glance

The community member is new to Marimo and is working with machine learning using the CatBoost library. They have found that CatBoost widgets work in JupyterLab but not in Marimo. They have tried installing the anywidget package, but it did not work. The community member has provided a simple code example to reproduce the issue, where the output is a widget with a Logloss graph.

In the comments, another community member has encountered a similar issue with the Unsupported mimetype: application/vnd.jupyter.widget-view+json error when running the example code. They suggest that the support needs to be added in CatBoost itself, as it uses IPython widgets. They also mention that they had to install additional packages like ipython, ipywidgets, and traitlets to run the example.

Another community member suggests that if the community member would like support to be added to Marimo, they should make an issue in the Marimo repository, as this was done for adding support for Pygwalker. Additionally, they note that Marimo supports anywidget, but not ipwidgets, and that many widget maintainers have been migrating to anywidget, so the CatBoost maintainer could be nudged to see if they want to do the same.

Useful resources
Hello, I'm new to Marimo.
I'm working with machine learning using CatBoost library for gradient boosting.
Some CatBoost features allows to visualize some widgets. CatBoost widgets do work in JupyterLab but not in marimo.
I have installed anywidget package this does not work.

To reproduce the problem you can run this simple code:

from catboost import CatBoostClassifier, Pool train_data = [[1, 3], [0, 4], [1, 7], [0, 3]] train_labels = [1, 0, 1, 1] model = CatBoostClassifier(learning_rate=0.03) model.fit(train_data, train_labels, verbose=False, plot=True)

The output is a widget with Logloss graph

Can someone help me with this?
Tanks

Ivan
H
M
3 comments
On running example code from here: https://catboost.ai/docs/en/features/visualization_jupyter-notebook

I get a Unsupported mimetype: application/vnd.jupyter.widget-view+json error.

If you refer to: https://docs.marimo.io/guides/integrating_with_marimo/displaying_objects/?h=format#option-3-implement-a-_mime_-method

I think the support needs to be added in catboost itself. A quick glance at their repo suggests they use IPython widgets.

I had to install ipython, ipywidgetsand traitlets to run some of the example.

Wonder if experimenting with anywidget for this could also work.
If you would like support to be added to marimo, I would suggest making an issue in their repo (if needed, I can do so too). Support for Pygwalker in marimo was done in a similar way.
marimo supports anywidget, but not ipwidgets. many widget maintainers have been migrating to anywidget. you could nudge this maintainer to see if they want to as well
Add a reply
Sign up and join the conversation on Discord