Skip to content

Change bokeh port keywords to dashboard_address - #2589

Merged
mrocklin merged 9 commits into
dask:masterfrom
mrocklin:diagnostics-address
Apr 9, 2019
Merged

mrocklin merged 9 commits into
dask:masterfrom
mrocklin:diagnostics-address

Conversation

@mrocklin

@mrocklin mrocklin commented Apr 1, 2019

Copy link
Copy Markdown
Member
LocalCluster(diagnostics_port=8787)  # Before
LocalCluster(dashboard_address='localhost:8787')  # After
dask-scheduler --bokeh-port 8787  # Before
dask-scheduler --dashboard-address :8787  # After

This has the following benefits:

  1. Removes the implementation detail of Bokeh from the name (not easily findable for new users)
  2. Allows people to specify both the address and the port. This is useful when the dashboard is running on a different network interface or comm than communication. This occurs in HPC situations when we have a network interface for Infiniband for data communication and another for outwardly facing web serving
  3. It unifies two similar keywords into the same name

@mrocklin

mrocklin commented Apr 1, 2019

Copy link
Copy Markdown
Member Author

cc @jhamman @guillaumeeb for HPC
cc @quasiben for UCX

@guillaumeeb guillaumeeb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am completly in favor of this change.

Not sure if deprecation and backward compatibility is totally handled, did not look at test results.

Comment thread distributed/cli/dask_worker.py Outdated
@click.option('--bokeh-port', type=int, default=0,
help="Bokeh port, defaults to random port")
help="Deprecated. See --dashboard-address")
@click.option('--dashboard-address', type=str, default=':8787',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's a change in default behavior, but I guess it's okay.

'localhost:8787' or '0.0.0.0:8787'. Defaults to ':8787'.
diagnostics_port: int
Port on which the :doc:`web` will be provided. 8787 by default, use 0
to choose a random port, ``None`` to disable it, or an

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we still disable bokeh with new kwarg?

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.

Yes, added in the docstring.

IP address on which the scheduler will listen, defaults to only localhost
dashboard_address: str
Address on which to listen for the Bokeh diagnostics server like
'localhost:8787' or '0.0.0.0:8787'. Defaults to ':8787'.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we want an exemple with 0 port for random choice?

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.

Added in the docstring

"The --bokeh-port flag has been renamed to --dashboard-address. "
"Consider adding ``--dashboard-address :%d`` " % bokeh_port
)
dashboard_address = bokeh_port

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't we need a semicolon before the port?

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.

This should still be valid. We still support many possible argument types for now.

"diagnostics_port has been deprecated. "
"Please use `dashboard_address=` instead"
)
dashboard_address = diagnostics_port

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Diagnostic port can be a tuple.

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.

This should still be valid. We still support many possible argument types for now.

def test_duplicate_clients():
pytest.importorskip('bokeh')
c1 = yield Client(processes=False, silence_logs=False, diagnostics_port=9876)
c1 = yield Client(processes=False, silence_logs=False, dashboard_address=9876)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Non semicolon?

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.

As above, this should still be valid. We still support many possible argument types for now.

@mrocklin

mrocklin commented Apr 6, 2019

Copy link
Copy Markdown
Member Author

Thanks for the review @guillaumeeb !

@mrocklin
mrocklin force-pushed the diagnostics-address branch from 03bc162 to 5c1ace4 Compare April 8, 2019 14:35
@mrocklin
mrocklin merged commit e363904 into dask:master Apr 9, 2019
@mrocklin
mrocklin deleted the diagnostics-address branch April 9, 2019 13:24
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