mljar-supervised icon indicating copy to clipboard operation
mljar-supervised copied to clipboard

import error

Open refrtharth opened this issue 2 years ago • 3 comments

using vs code on windows 10

(mljar) PS C:\Users\harthk1\Documents\Projects\python\Projects\mljar> & C:/Users/harthk1/Documents/Projects/python/Projects/mljar/Scripts/python.exe c:/Users/harthk1/Documents/Projects/python/Projects/mljar/44shred-with-mljar.py Traceback (most recent call last): File "c:/Users/harthk1/Documents/Projects/python/Projects/mljar/44shred-with-mljar.py", line 23, in from supervised.automl import AutoML File "C:\Users\harthk1\Documents\Projects\python\Projects\mljar\lib\site-packages\supervised_init_.py", line 3, in from supervised.automl import AutoML File "C:\Users\harthk1\Documents\Projects\python\Projects\mljar\lib\site-packages\supervised\automl.py", line 3, in from supervised.base_automl import BaseAutoML File "C:\Users\harthk1\Documents\Projects\python\Projects\mljar\lib\site-packages\supervised\base_automl.py", line 19, in from supervised.algorithms.registry import AlgorithmsRegistry File "C:\Users\harthk1\Documents\Projects\python\Projects\mljar\lib\site-packages\supervised\algorithms\registry.py", line 65, in import supervised.algorithms.decision_tree File "C:\Users\harthk1\Documents\Projects\python\Projects\mljar\lib\site-packages\supervised\algorithms\decision_tree.py", line 22, in from dtreeviz.trees import dtreeviz File "C:\Users\harthk1\Documents\Projects\python\Projects\mljar\lib\site-packages\dtreeviz\trees.py", line 13, in from graphviz.backend import run, view

I had to go to C:\Users\harthk1\Documents\Projects\python\Projects\mljar\lib\site-packages\dtreeviz\trees.py and remove run from from graphviz.backend import run, view

mljar-supervised 0.8.9 and dtreeviz version 1.0

everything fine ran fine after making the change.

refrtharth avatar Mar 24 '22 15:03 refrtharth

The problem is the line

from dtreeviz.trees import dtreeviz

I guess this doesn't exist anymore? I changed it to "import dtreeviz" and the system at least runs.

willer avatar Jan 16 '23 23:01 willer

Hi @willer, the dtreeviz package was updated to 2.0, and there was change in the API. You can just update the dtreeviz package to the latest version.

pplonski avatar Jan 17 '23 07:01 pplonski

Great!

willer avatar Jan 20 '23 03:01 willer