Git Product home page Git Product logo

Comments (6)

mrocklin avatar mrocklin commented on September 4, 2024

from streamz.

CJ-Wright avatar CJ-Wright commented on September 4, 2024

Do we just stuff color information in the graphviz nodes somewhere and expect graphviz to know what to do?

from streamz.

mrocklin avatar mrocklin commented on September 4, 2024

from streamz.

mrocklin avatar mrocklin commented on September 4, 2024

from streamz.

jrmlhermitte avatar jrmlhermitte commented on September 4, 2024

sounds good. tried it and seems simple (use style=filled with color=clr). Looks like we can use much more, such as shape.

Did you have any coloring in mind?
I think differentiating stream methods (map, filter etc) as well as stream subclasses (for example from Stream to DaskStream) could be nice. Maybe it could be something simple such as color for the methods and shape for the subclasses. Since 'method' might be a little ambiguous, here's an example:

from streamz import Stream
s = Stream()
s2 = s.map(lambda x :x + 1)
from streamz import DaskStream
# now objects are Futures
s3 = DaskStream.scatter(s2)
# still a Future
s4 = s3.map(lambda x : x**2)
s5 = DaskStream.gather(s4)

Here s2 and s4 nodes would have the same color but different shape.

Shape would be extremely useful. For example, running filter on a DaskStream would yield a Stream (which is unlikely to be intended use). This could be useful for debugging, where one could use the visualized stream to more quickly see if the data is transforming the way we expect.

What do you think?

from streamz.

CJ-Wright avatar CJ-Wright commented on September 4, 2024

I am good with all of those. I'd like to make these (private) attributes of the classes, this way classes which inherent from them/override them would be easy to use. (eg we'd just need to change the shape once for dask streams if they all inherited)
I don't have any particular coloring in mind, we may consider drawing from an MPL color cycle since those are more likely to be colorblind safe.

from streamz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.