Optuna: Visualizations don't work in Jupyter Lab

Created on 15 Jan 2020  路  4Comments  路  Source: optuna/optuna

Visualizations don't work in Jupyter Lab. I see just empty (white) plots. In Jupyter Notebook everything is OK.

Expected behavior

Visualizations should be available from Jupyter Lab.

Environment

  • Optuna version: 1.0.0
  • Python version: 3.7.4
  • OS: Ubuntu 18.04.3
  • (Optional) Other libraries and their versions:
    plotly==4.4.1
    jupyterlab==1.2.4
    jupyterlab-server==1.0.6

Steps to reproduce

  1. Create a study object.
  2. Run study.optimize
  3. Plot any visualization.

Reproducible examples (optional)

optuna.visualization.plot_slice(study)

Or any other plot.

Additional context (optional)

Screenshot of empty visualization:
image
There is an error in the browser console:
Screenshot from 2020-01-15 20-26-45
Screenshot from 2020-01-15 20-27-13

bug

Most helpful comment

@srizvan Thank you for your feedback.
I created a PR (https://github.com/optuna/optuna/pull/843) to update the document for JupyterLab users to solve this issue. Please let me know if you have any comments.

All 4 comments

@srizvan Did you follow the steps stated here?

@srizvan Thank you for reporting the issue.
I reproduced your issue and found that the additional installation step suggested by @harupy solved it as follows:

image

@harupy Thank you for your information.

Environment

  • Optuna version: 1.0.0
  • Python version: 3.7.2
  • OS: macOS 10.13.6
  • Other libraries and their versions:

    • plotly==4.4.1

    • jupyterlab==1.2.4

    • jupyterlab-server==1.0.6

@harupy Yeah, that worked for me. Thank you.
I think, link to these additional steps should be provided in optuna docs in the "Installation" section.

@srizvan Thank you for your feedback.
I created a PR (https://github.com/optuna/optuna/pull/843) to update the document for JupyterLab users to solve this issue. Please let me know if you have any comments.

Was this page helpful?
0 / 5 - 0 ratings