Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catboost widget doesn't work #23

Open
LyzhinIvan opened this issue Apr 4, 2022 · 0 comments
Open

Catboost widget doesn't work #23

LyzhinIvan opened this issue Apr 4, 2022 · 0 comments

Comments

@LyzhinIvan
Copy link

LyzhinIvan commented Apr 4, 2022

Hi! I was very pleasant to find out that Colab supports third-party widgets now! But then I find out that the widget of CatBoost package still doesn't work.
Simple script to reproduce:

!pip install --user --upgrade catboost
!pip install --user --upgrade ipywidgets
!pip install sklearn
!jupyter nbextension enable --py widgetsnbextension

from google.colab import output
output.enable_custom_widget_manager()

from catboost import CatBoostRegressor
from sklearn.datasets import make_regression

X, y = make_regression()
model = CatBoostRegressor(iterations=10)
model.fit(X, y, plot=True)

It gives me strange output without plots:
Screen Shot 2022-04-04 at 2 45 07 PM
And with error in console:
Screen Shot 2022-04-04 at 2 48 12 PM

After some investigation I thought that the problem is that catboost-widget package at CDN doesn't have dist/index.js file. I've found in this repository the code that builds url for widget source. I've tried to specify another file by changing this line to:
_model_module = Unicode('catboost-widget/src/index.js').tag(sync=True).
But it didn't help. The error message has been changed respectively to:
Screen Shot 2022-04-04 at 2 48 51 PM
Wheel with this "fix" for python3.7 can be downloaded by the link: https://disk.yandex.ru/d/TfBf6uCNw4Wfyw

Please, help me to find out which changes I should make in CatBoost to make the widget works.

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

No branches or pull requests

1 participant