Skip to content

DOC: update docs for viewing Dashboard (#116) - #118

Merged
guillaumeeb merged 8 commits into
dask:masterfrom
raybellwaves:doc-dask-dashboard
Aug 29, 2018
Merged

guillaumeeb merged 8 commits into
dask:masterfrom
raybellwaves:doc-dask-dashboard

Conversation

@raybellwaves

Copy link
Copy Markdown
Member

Fixes #116

@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.

Thanks for sticking with this project @raybellwaves!

Some comments below, I'm mainly concerned by how things are organised between the notebook and the Dashboard, this does not seem really clear to me.

Comment thread docs/examples.rst Outdated
To solve this, you can use SSH tunneling. Let's say we started with the
following setup:
Sometimes the Dask Dashboard might not be directly accessible via the browser.
This may be due to the notebook being served at one IP address and the

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.

The original reason is something like this:

"This may be due to the Dashboard being served to an IP not accessible from your computer's network. "

But we can add something like you say:

"If you can see the notebook but not the Dashboard, then they are probably served at different IP¨addresses".

Comment thread docs/examples.rst Outdated
To solve this you can use SSH tunneling.

If you are using a notebook it is recommended to follow the configuration instructions
given in the `Pangeo documentation <http://pangeo-data.org/setup_guides/hpc.html#configure-jupyter>`_.

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.

Which are reminded below?

Comment thread docs/examples.rst Outdated
SSH tunneling.
On inspection of the ``client`` object, you see that the client can be viewed at
``172.16.23.102``, for example. It is then recommended the notebook is served at
this IP address:

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.

This sentence is weird, something is missing?

Comment thread docs/examples.rst Outdated
.. code-block:: bash


$ ssh -N -L 8888:172.16.23.102:8888 USER@DOMAIN &

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'm not sure about all the notebook doc here. Several reason for that :

  • It comes after the doc saying how to inspect the client, and it looks like you're chosing the notebook IP based on the Dashboard IP. It is often the other way around.
  • Depending on your configuration, you don't really get to chose to launch the notebook on a given address (especially in HPC setup where you may have to submit a job to the cluster for the notebook).

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.

You are right. I've mostly been running my notebook on the login node which isn't good practice. I'll do some more testing.

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.

It can be the standard in some setup, but not always, we just have to be generic enough in the docs.

Comment thread docs/examples.rst

.. code-block:: bash

Now, you can go to ``http://localhost:8787`` on your browser to view the dashboard.

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 would still put the link to localhost dashboard, even if we keep Jupyter part above.

Comment thread docs/index.rst

index.rst
install.rst
examples.rst

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.

Good catch, I just noticed that on the web site.

However I'm not sure this belongs into the examples page. Maybe directly in the index ?

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.

I agree, I'll move it to the end of index.rst

@raybellwaves

raybellwaves commented Aug 12, 2018 •

Copy link
Copy Markdown
Member Author

I have rewrote the section as I do not believe the situation described in the docs at https://github.com/dask/dask-jobqueue/blob/master/docs/examples.rst#viewing-dask-dashboard or the issues that arose in #80 and #116 will occur anymore due to the recent PR's (#111 (comment))?

@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.

The end is probably not correct for all setup, other comments are minor.

Comment thread docs/index.rst Outdated

Firstly, configure the Jupyter notebook on the HPC as given in the
`Pangeo documentation <http://pangeo-data.org/setup_guides/hpc.html#configure-jupyter>`_.
This is repeated here for completeness:

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.

Are we sure we want to duplicate this doc? Maybe the link is enough.

Comment thread docs/index.rst Outdated
Viewing the Dask Dashboard
--------------------------

It is recommended to run a Jupyter notebook server on the HPC and specify the IP address

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'm slightly confused, is it 'recommended'? It certainly is the most convenient way to use dask-jobqueue.

Also, for the 'specify the IP', we should just say 'be able to retrieve the IP address'. I belive that most users won't know which IP address to set at first.

Comment thread docs/index.rst Outdated
``chmod 400 ~/.jupyter/jupyter_notebook_config.py``.

Start a Jupyter notebook server on the HPC (it is best practice to run/submit this as a
job to an interactive queue).

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 would just say "it is often a good practice to", it not always the best pratice.

Comment thread docs/index.rst Outdated

Open the Jupyter notebook in a browser on your local machine at http://localhost:8888.
The Dask Dashboard should now be accessible by clicking the link displayed after
inspecting the ``client`` object.

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 I believe it won't work for most users. For example, I have to do either SSH tunneling on bokeh scheduler adress and port, or use nbserverproxy. Only SSH tunneling to the notebook won't make the Dashboard accessible to me. So there is at least another SSH tunneling to describe.

Also, we should probably add a more detailed description of what has been done in the notebook.

@guillaumeeb

Copy link
Copy Markdown
Member

@raybellwaves do you plan to work on this again soon? Do you have any concern with my comments?

I'd like to move on here, and then add some lines on how to use nbserverproxy.

@raybellwaves

Copy link
Copy Markdown
Member Author

Thanks for the prompt. Sorry for the delayed response. I agree with your comments. I’ll work on this tonight

@guillaumeeb

Copy link
Copy Markdown
Member

As there was still some misunderstanding here, and I could'nt see how to explain myself, I decided to push a new version on your branch @raybellwaves, hope it's OK for you.

There's a lot of modification actually, because I wanted to take into account your emphasis on Jupyter, but not leave the Dashboard without Jupyter solution behind.

I believe that the solution that works for you and you described here #116 (comment), using Jupyter to launch dask-jobqueue to get the scheduler IP and use that as an option to another jupyter launch is a bit complicated, and not required.

Happy to hear your opinion though, cc @lesteve and @jhamman.

@raybellwaves

Copy link
Copy Markdown
Member Author

I was going to suggest you may want to re-write some sections so it flows better if/when you add the nbserverproxy solution so thanks for the amendments. I don't have any issues with this.

I probably didn't make it clear but I would find out the IP address using python on the HPC before doing the jupyter notebook command

$ python
>>> from dask_jobqueue import LSFCluster
>>> from dask.distributed import Client
>>> cluster = LSFCluster(cores=2, memory='4 GB')
>>> client = Client(cluster)
>>> print(client)

@guillaumeeb

Copy link
Copy Markdown
Member

Okay you were using simple python and not jupyter at first. Doesn't the solution with hostname command works for you?

Do not hesitate to review this and make some comment.

@guillaumeeb

Copy link
Copy Markdown
Member

ping @jhamman @lesteve it would be good to have a review here!

@guillaumeeb guillaumeeb mentioned this pull request Aug 24, 2018
@guillaumeeb

Copy link
Copy Markdown
Member

I plan to get this in soon, as I believe there is some useful information in it, currently not really accessible in the docs, and to be able to move on #111 fix.

If there is some issue about the content, this can be addressed by later PR.

@guillaumeeb
guillaumeeb merged commit ce808b2 into dask:master Aug 29, 2018
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.

3 participants