Skip to content

Improve the display of visualize #504

@MarieSacksick

Description

@MarieSacksick

When using the following piece of code in vscode in a python file with the extension to be able to execute cell per cell:

# %%
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split

X, y = load_iris(return_X_y=True, as_frame=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42)

# %%
from sklearn.tree import DecisionTreeClassifier

model = DecisionTreeClassifier(random_state=42)
model.fit(X_train, y_train)

# %%
from skops import io as sio
sio.dump(model, "model.skops")

# %%
sio.visualize("model.skops")

The output is not really readible, there is plenty of spaces between each line, and the indentation is not correct (cf screen shot below).

Image

It affect the usability and interest of this feature. If the display could be improved, it would be awesome!

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