parrt / dtreeviz

A python library for decision tree visualization and model interpretation.
MIT License
2.89k stars 332 forks source link

Out of memory when calling viz.view() #308

Closed shenzhun closed 9 months ago

shenzhun commented 9 months ago

OS: mac M1, Ventura 13.3 Anaconda: 3

I followed the installation guide for dtreeviz and graphviz: dot installation status: (dev) ➜ ~ which dot /opt/homebrew/bin/dot (dev) ➜ ~ ls -l $(which dot) /opt/homebrew/bin/dot -> ../Cellar/graphviz/9.0.0/bin/dot

But when calling viz.view() in my jupyterLab, it threw the following out of memory error:

viz = dtreeviz.model(regressor, tree_index=1,
               X_train=X_train, y_train=y_train,
               target_name=target,
               feature_names=features)

viz.view()
  File <string>
ParseError: out of memory: line 1, column 0
tlapusan commented 9 months ago

Hi @shenzhun ,

can you give us more details about the size of the dataset ? or a notebook to replicate it would be ideal, otherwise hard to debug OOM problem. Maybe you could try with a few samples to see if the OOM is generated by the size of data.

tlapusan commented 9 months ago

@shenzhun any feedback on this ? Otherwise we could close it :)