mljar / mljar-supervised

Python package for AutoML on Tabular Data with Feature Engineering, Hyper-Parameters Tuning, Explanations and Automatic Documentation
https://mljar.com
MIT License
2.99k stars 400 forks source link

import error #530

Open refrtharth opened 2 years ago

refrtharth commented 2 years ago

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.

willer commented 1 year ago

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.

pplonski commented 1 year ago

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.

willer commented 1 year ago

Great!