Comments (3)
@jqmp I started looking into this and looks like as of today, Pillow does not support SVG. But it's straightforward to get a SVG from a pydot graph, so we can evaluate additional packages like Cairo and svglib to actually render the image.
Let me know if you have a preference
from bionic.
Oh, good point. I'm cool with adding a dependency if necessary. That said, it seems to me that we want to support two main use cases:
# Saving to a file.
flow.render_dag(format='svg').save('my_dag.svg')
# Inside a Jupyter notebook, this should render the image.
flow.render_dag(format='svg')
I don't know offhand if those libraries provide a class that supports both of those. However, since Jupyter knows how to render SVGs already, it would probably be easy to define our own SvgImage
class that implements save
and _repr_svg_
methods. What do you think?
from bionic.
Will look into whether either library does this natively, otherwise adding the new class makes sense to me.
from bionic.
Related Issues (20)
- Errors from unset entities are hard to debug
- @changes_per_run generates extra cache entries
- Non-persistable entities can sometimes be spuriously recomputed
- Redefining an entity with a function can produce surprising results
- The "provider" concept is too broad
- Should bionic.util.init_basic_logging only affect logging for bionic components?
- Concerning exception messages in pytest on Python 3.8 HOT 4
- Compute task states in the subprocesses
- Multiple processes and threads? HOT 1
- Full test suite fails on OS X Catalina HOT 1
- Caching fails when directory names contain spaces
- `FlowBuilder.merge` not accepting another builder is confusing
- Reloading of flow spanning multiple files HOT 1
- Docs: Functions with multiple outputs cannot be called explicitly HOT 2
- Uncached values should be recomputed each time they're used HOT 1
- Set-valued entities are not hashed determistically
- Confusing error message when non-iterable input used with `outputs`
- parallel evaluation inconsistencies with persist settings
- Improve error message when protocols fail
- Test vector update script should delete old test vectors
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 bionic.