Git Product home page Git Product logo

Comments (7)

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

it works:

s = Stream(); sout = s.map(delayed).map(lambda x : x).map(client.compute).sink_to_list()

I might use a bounded queue or LRU cache for the list. (I guess a bounded queue should be fine since a queue of futures is like an LRU if I understand correclty)
I think what confused me is that in the non-stream case, I'm not storing the future from the client.compute somewhere but it still cached the result.

Would you know by any chance why the non stream case is not being garbage collected? I also noticed inconsistent results for this. (some times the cache would grow, sometimes not, and just replace a parameter). I am just curious. Might be worth warning about this in docs too.

thanks!

from streamz.

mrocklin avatar mrocklin commented on September 4, 2024

from streamz.

jrmlhermitte avatar jrmlhermitte commented on September 4, 2024

just to be clear i was talking about this line:

    client.compute(delayed(lambda x : x))

the results are getting cached on the machine. is this intended? thanks again for the response
(excuse my brevity sent from a mobile)

from streamz.

mrocklin avatar mrocklin commented on September 4, 2024

No, I don't know. Maybe it just hasn't gotten the message yet? If you are in IPython or jupyter then it stores the outputs of every cell. That could be it as well.

from streamz.

jrmlhermitte avatar jrmlhermitte commented on September 4, 2024

ah yes, that's it, I forget about those magical _... variables. it also explains the maximum size of the cache.
thanks!

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.