Ivan
Ivan4d ago

Unable to show CatBoost widgets

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
No description
3 Replies
Hall
Hall4d ago
Someone will reply to you shortly. In the meantime, this might help:
Haleshot
Haleshot4d ago
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.
Myles Scolnick
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

Did you find this page helpful?