studio-lab-examples icon indicating copy to clipboard operation
studio-lab-examples copied to clipboard

Unable to use dask-labextension dashboard

Open scottyhq opened this issue 3 years ago • 3 comments

First of all, thank you for studio-lab, it is an amazing resource and generally works very smoothly!

Describe the bug JupyterLab extension for Dask is a fantastic resource that helps with diagnostics for parallel computations. Unfortunately it seems the dashboard is nonfunctional due to SageMaker network settings as detailed in this existing issue https://github.com/dask/dask/issues/5432.

To Reproduce

  1. Following the docs here
conda activate studiolab
conda install -c conda-forge dask distributed dask-labextension
  1. Stop runtime.
  2. Start runtime
  3. In a notebook start a dask cluster:
from dask.distributed import Client
client = Client()
client
  1. navigate to: https://SESSSIONIDHERE.studio.us-east-2.sagemaker.aws/studiolab/default/jupyter/proxy/8787/status

Expected behavior Dashboard diagnostic plots should appear below the active toolbar on the proxied webpage or via the labextension plots.

Screenshots Screen Shot 2022-01-04 at 3 53 39 PM

See additional screenshots in linked issue (https://github.com/dask/dask/issues/5432)

Desktop (please complete the following information):

  • OS: OSX
  • Chrome 96

Additional context There is a recent blog post detailing how to do a custom setup, but it would be fantastic if this just worked out of the box with studiolab. https://aws.amazon.com/blogs/machine-learning/machine-learning-on-distributed-dask-using-amazon-sagemaker-and-aws-fargate/

scottyhq avatar Jan 04 '22 23:01 scottyhq

Thanks for trying out SageMaker Studio Lab and we are glad that you are liking it. Some Jupyter extensions including Dask extension require Node JS. Currently Node JS is not available in currently release. We have that on the roadmap for a future release. However, this extension also requires additional network configurations ,Studio Lab was intended for local experimentation as such at present we do have this capability. The workarounds mentioned in the blog post are applicable to standard AWS SageMaker Studio (Not the SageMaker Studio Lab) which allows additional deployment options.

samx18 avatar Jan 05 '22 01:01 samx18

This should work, it may just be that the project needs to be restarted for the Jupyter server proxy to pickup the dask extension. Can you try that?

ellisonbg avatar Jan 13 '22 00:01 ellisonbg

I confirmed that we have problems to overcome for working dask-labextension in Studio Lab. The websocket connection seems not be allowed in Studio Lab. As same as https://github.com/dask/dask/issues/5432, I could view the dashboard, but I was getting a websocket error.

image

Reproduce procedure is same as @scottyhq and I tried restart the JupyterLab as @ellisonbg proposed.

image

@samx18 pointed the Node.js requirements but JupyterLab 3.0 or greater does not depend on it.

icoxfog417 avatar Jun 29 '22 03:06 icoxfog417