GithubHelp home page GithubHelp logo

Comments (4)

mrocklin avatar mrocklin commented on May 27, 2024

What is s5?

from streamz.

mrocklin avatar mrocklin commented on May 27, 2024
In [1]: from distributed import Client
   ...: import streamz.dask as sd
   ...: from streamz import Stream
   ...: from tornado import gen
   ...: from tornado.ioloop import IOLoop
   ...: from distributed import sync
   ...: 
   ...: client = Client(processes=False)
   ...: 
   ...: def foo(x):
   ...:     print("incrementing")
   ...:     return x + 1
   ...: 
   ...: s = Stream()
   ...: s2 = sd.scatter(s)
   ...: s3 = s2.map(foo)
   ...: s4 = sd.gather(s3)
   ...: s4.sink(print)
   ...: 
Out[1]: <sink: print>

In [2]: s.emit(1)
incrementing
2
Out[2]: []

In [3]: s.emit(2)
incrementing
3
Out[3]: []

In [4]: s.emit(3)
incrementing
4
Out[4]: []

In [5]: history
from distributed import Client
import streamz.dask as sd
from streamz import Stream
from tornado import gen
from tornado.ioloop import IOLoop
from distributed import sync

client = Client(processes=False)

def foo(x):
    print("incrementing")
    return x + 1

s = Stream()
s2 = sd.scatter(s)
s3 = s2.map(foo)
s4 = sd.gather(s3)
s4.sink(print)
s.emit(1)
s.emit(2)
s.emit(3)

from streamz.

jrmlhermitte avatar jrmlhermitte commented on May 27, 2024

thanks. i should have debugged on Client. The issue doesn't seem to be related to streams. Something more to do with the scheduler and worker on my machine. I'll look into it later.

Scheduler output:

distributed.scheduler - INFO - Receive client connection: Client-7d83d866-b02b-11e7-ae65-989096dbd8b9
distributed.scheduler - INFO - User asked for computation on lost data, foo-6fae4e6b1ff29357d2ffcc2568e2af02

from streamz.

jrmlhermitte avatar jrmlhermitte commented on May 27, 2024

For the record: I fetched the latest version of distributed and dask and reinstalled and re-ran my scheduler and workers. No issue here anymore. So I'm not sure what went wrong. I will just leave it at that. If I see an issue again, I'll post on stackoverflow

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.