Skip to content

Forward kwargs through Nanny to Worker - #2596

Merged
mrocklin merged 4 commits into
dask:masterfrom
bchu:worker-kwargs
Apr 6, 2019
Merged

mrocklin merged 4 commits into
dask:masterfrom
bchu:worker-kwargs

Conversation

@bchu

@bchu bchu commented Apr 5, 2019

Copy link
Copy Markdown
Contributor

Ensure Nanny forwards kwargs to Worker. kwargs are no longer forwarded to ServerNode.

kwargs scheduler_port, scheduler_file, and loop are still "intercepted" by Nanny.__init__ (and are not forwarded to Worker). I'm assuming this is okay for now.

For readability I've also moved scheduler_ip to the kwargs object (instead of in the worker_args).

This would resolve part of #2456

Let me know if I should add a test (?)

@mrocklin

mrocklin commented Apr 6, 2019

Copy link
Copy Markdown
Member

Thanks for the PR @bchu ! In general this looks like a nice improvment. Sorry also for the late response, this PR happened to overlap with the annual AnacondaCon conference where many Dask maintainers were somewhat busy :)

One concern I have is that we now no longer route through the keywords that might have been sent to the ServerNode constructor (the superclass of Nanny). Those are available here:

def __init__(self, handlers=None, blocked_handlers=None, stream_handlers=None,
connection_limit=512, deserialize=True,
connection_args=None, io_loop=None, serializers=None,
deserializers=None):

However, going through that list I'm not sure if this is likely to ever be an issue. I think it's more likely that a user would intend for these keywords to be passed through to worker than to apply to the Nanny (which does relatively little, and so needs relatively little configuration). I mention this here now just in case someone runs into this and comes back to this PR.

Merging. Thanks for the contribution. Also, I notice that this is your first code contribution to this repository. Welcome!

@mrocklin
mrocklin merged commit b18f32a into dask:master Apr 6, 2019
@bchu
bchu deleted the worker-kwargs branch April 8, 2019 19:45
darindf pushed a commit to darindf/distributed that referenced this pull request Apr 11, 2019
muammar added a commit to muammar/distributed that referenced this pull request Apr 12, 2019
* upstream/master:
  Add RabbitMQ SchedulerPlugin example (dask#2604)
  add resources to scheduler update_graph plugin (dask#2603)
  Use ensure_bytes in serialize_error (dask#2588)
  Specify data storage explicitly from Worker constructor (dask#2600)
  Change bokeh port keywords to dashboard_address (dask#2589)
  .detach_() pytorch tensor to serialize data as numpy array. (dask#2586)
  Add warning if creating scratch directories takes a long time (dask#2561)
  Fix typo in pub-sub doc. (dask#2599)
  Allow return_when='FIRST_COMPLETED' in wait (dask#2598)
  Forward kwargs through Nanny to Worker (dask#2596)
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