GithubHelp home page GithubHelp logo

Comments (10)

CJ-Wright avatar CJ-Wright commented on May 27, 2024

Should we have some logic for this in disconnect as well? Should we have a separate method which searches the graph for references to a node and deletes them?

from streamz.

mrocklin avatar mrocklin commented on May 27, 2024

I would implement this by using weakref.Weakset objects. Python would handle this for us automatically

from streamz.

CJ-Wright avatar CJ-Wright commented on May 27, 2024

Ah I see, to properly implement this we would need to have at least one hard reference (which the user needs to keep track of) since all the internal graph references would be weak. I presume that weakref properly propagates the hard reference to one node to all the other nodes?

from streamz.

mrocklin avatar mrocklin commented on May 27, 2024

Yes

from streamz.

mrocklin avatar mrocklin commented on May 27, 2024

Or rather, I am not currently concerned about if this is possible or how to implement it. I am more curious to know if we want these semantics or not.

from streamz.

CJ-Wright avatar CJ-Wright commented on May 27, 2024

I'm on board with this, although I'm a little curious what happens to the other nodes if we delete the bottom most node.

from streamz.

jrmlhermitte avatar jrmlhermitte commented on May 27, 2024

Sorry, I never saw this. I would have disagreed. I would have voted more for a better way to view parents and children and have their references returned.
My main issue is that this will lead to an inconsistency between usage in ipython and running in a script. See #72. I am fine with going through with it, so long as we're all okay with this. We'll have to definitely document this potentially surprising behaviour to a new user. Thanks, and sorry for being late on this.

from streamz.

CJ-Wright avatar CJ-Wright commented on May 27, 2024

I think we should have "a better way to view parents and children and have their references returned" anyway. Especially if we want users to start playing with the pipeline live.

from streamz.

jrmlhermitte avatar jrmlhermitte commented on May 27, 2024

I agree. I'm not sure how to make this actionable. Will think about it. Perhaps the stream should have an s.pprint() method? (which would plot a graph like print inline, sort of like git log --graph or simliar?)
We can make it an issue

from streamz.

CJ-Wright avatar CJ-Wright commented on May 27, 2024

I think we could actually return the graph it self (as some sort of DiGraph object) so that people could operate upon the graph (connecting/disconnecting nodes) and have that translated down to the streams level.

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.