Skip to content

Bug: Error Visualizing DecisionTreeRegressor #385

@reidjohnson

Description

@reidjohnson

Attempting to visualize the skops file for a sklearn DecisionTreeRegressor produces the following error:

TypeError: Cannot deal with <class 'type'>, please report the issue here: https://github.com/skops-dev/skops/issues

Reproducible example:

from sklearn.datasets import make_regression
from sklearn.tree import DecisionTreeRegressor
from sklearn.model_selection import train_test_split
from skops.io import dumps, loads, visualize

X, y = make_regression()
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.4)

dumped = dumps(DecisionTreeRegressor().fit(X_train, y_train))
loaded = loads(dumped)

visualize(dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions