Skip to content

Worker bokeh - #709

Merged
mrocklin merged 15 commits into
dask:masterfrom
mrocklin:worker-bokeh
Dec 1, 2016
Merged

mrocklin merged 15 commits into
dask:masterfrom
mrocklin:worker-bokeh

Conversation

@mrocklin

@mrocklin mrocklin commented Nov 29, 2016 •

Copy link
Copy Markdown
Member

Adds a Bokeh server to every worker. Nothing fancy here yet. But it's quite easy to add diagnostics.

image

@pitrou this may interest you (if you ever wanted to play with Bokeh)

@mrocklin mrocklin changed the title Worker bokeh WIP - Worker bokeh Nov 29, 2016
@mrocklin mrocklin changed the title WIP - Worker bokeh Worker bokeh Nov 30, 2016
sizing_mode='scale_width'))


class BokehWorker(object):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @bryevdv You might be interested in glancing over this.

This is how I'm using a Bokeh server embedded in every Dask worker.

@mrocklin

mrocklin commented Dec 1, 2016

Copy link
Copy Markdown
Member Author

@pitrou any thoughts on what might be causing the Python 2.7 errors on this PR?

https://travis-ci.org/dask/distributed/jobs/180385905
https://travis-ci.org/dask/distributed/jobs/180380932
https://travis-ci.org/dask/distributed/jobs/180274371

I'm only able to reproduce this locally when I run the full test suite rather than just these tests in isolation. I'm only able to reproduce in Python 2.

We are adding Bokeh, which runs on the Tornado IOLoop. I don't believe we ever let it manage the IOLoop though.

@pitrou

pitrou commented Dec 1, 2016

Copy link
Copy Markdown
Member

https://travis-ci.org/dask/distributed/jobs/180385905#L1462 looks like the IO loop was closed from another thread than the thread it was running on.

There's an unrelated issue on AppVeyor, probably because Windows timers don't have enough granularity:

 File "C:\projects\distributed\distributed\worker.py", line 434, in get_data
    'bandwidth': total_bytes / (stop - start)
ZeroDivisionError: float division by zero

@mrocklin

mrocklin commented Dec 1, 2016

Copy link
Copy Markdown
Member Author

OK, I found it. bokeh.server.server.Server creates a bokeh.server.tornado.BokehTornado which, on construction adds a signal handler for SIGTERM that calls self.stop, which stops the IOLoop.

Reported to Bokeh a couple days ago here: bokeh/bokeh#5494

cc @bryevdv

@mrocklin
mrocklin merged commit 4a01a9e into dask:master Dec 1, 2016
@mrocklin
mrocklin deleted the worker-bokeh branch December 1, 2016 16:48
@QuLogic QuLogic mentioned this pull request Mar 6, 2022
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants