Comments (8)
actually, i guess in notebooks you never call viz.view(). should be just a ref to viz which is an object that notebooks know how to display.
from dtreeviz.
I had the same issue with Jupyter Lab on Linux. Easy fix: calling viz
instead of viz.view()
works fine, as shown in the notebooks inside the repo.
from dtreeviz.
mac? windows? anaconda?
from dtreeviz.
The remote server is Ubuntu with anaconda virtual environment and I log in jupyter-lab on mac.
from dtreeviz.
If I run all things on mac without using remote Ubuntu. Errors occur as follows:
Format: "svg:cairo" not recognized. Use one of: svg:svg:core
---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
<ipython-input-4-d2742afb20d1> in <module>
----> 1 viz.view()
~/anaconda3/lib/python3.6/site-packages/dtreeviz/trees.py in view(self)
66 tmp = tempfile.gettempdir()
67 svgfilename = f"{tmp}/DTreeViz_{getpid()}.svg"
---> 68 self.save(svgfilename)
69 view(svgfilename)
70
~/anaconda3/lib/python3.6/site-packages/dtreeviz/trees.py in save(self, filename)
89 cmd = ["dot", f"-T{format}:cairo", "-o", filename, dotfilename]
90 # print(' '.join(cmd))
---> 91 stdout, stderr = run(cmd, capture_output=True, check=True, quiet=False)
92
93 else:
~/anaconda3/lib/python3.6/site-packages/graphviz/backend.py in run(cmd, input, capture_output, check, quiet, **kwargs)
157 stderr_write_bytes(err, flush=True)
158 if check and proc.returncode:
--> 159 raise CalledProcessError(proc.returncode, cmd, output=out, stderr=err)
160
161 return out, err
CalledProcessError: Command '['dot', '-Tsvg:cairo', '-o', '/var/folders/mn/3rsprdf53zqfhr_z6nswd5340000gn/T/DTreeViz_41460.svg', '/var/folders/mn/3rsprdf53zqfhr_z6nswd5340000gn/T/DTreeViz_41460']' returned non-zero exit status 1.
from dtreeviz.
that is the brew install issue I think. did you do
brew install graphviz --with-librsvg --with-pango
Try uninstall graphviz then do that.
from dtreeviz.
i pushed 0.4 last night. can you see if that works for you as well?
from dtreeviz.
I installed dtreeviz yesterday using the master branch (installing from pypi didn't work, I had an error). So I have 0.4 and still need to call viz
at the end of a jupyter lab cell instead of viz.view()
from dtreeviz.
Related Issues (20)
- from dtreeviz.trees import * Import necessary libraries HOT 1
- Color keyword argument - Value error HOT 14
- Add support for TensorFlow GradientBoostedTreesModel model
- _regr_leaf_viz calculates the mean for prediction value.
- WARNING:matplotlib.font_manager:findfont: Font family 'Arial' not found. HOT 2
- Decision Tree visualize wrong path HOT 1
- When using dataset that is different from the training for trees models - does not draw HOT 1
- Support for RandomForest HOT 5
- Visualize custom decision tree HOT 1
- how to use dtreeviz in streamlit HOT 2
- VisualisationNotYetSupportedError: get_min_samples_leaf() is not implemented yet for XGBoost. HOT 4
- TypeError: list indices must be integers or slices, not numpy.float64 HOT 5
- Crash when leaf nodes have no samples HOT 1
- Out of memory when calling viz.view() HOT 2
- Integrate AI explanation
- CatBoost need to be supported. HOT 1
- AttributeError: module 'dtreeviz' has no attribute 'model' on Windows platform, works fine on Google colab
- tfdf.keras.CartModel support? HOT 1
- TypeError: 'int' object is not subscriptable HOT 3
- Development requirement in `setup.py` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dtreeviz.