Skip to content

Commit

Permalink
Workaround for tutorial visualizations not working in colab and remot…
Browse files Browse the repository at this point in the history
…e setup (#2030)

Summary:
Pull Request resolved: #2030

Visualization in Ax tutorials is not working in colab and remote setup. This diff updates the "Visualization" tutorial on the ax.dev/tutorials page to show Sait's suggested workaround  using `plotly.io.redenderers` & adds a message pointing to that workaround when `init_notebook_plotting` is called

Reviewed By: saitcakmak, Balandat

Differential Revision: D51667836

fbshipit-source-id: d5e0a1de9a313ec10fe3f4a0e96c26bc5ba53b30
  • Loading branch information
eonofrey authored and facebook-github-bot committed Dec 1, 2023
1 parent ef3b1c1 commit 02e4ce8
Show file tree
Hide file tree
Showing 2 changed files with 399 additions and 341 deletions.
7 changes: 7 additions & 0 deletions ax/utils/notebook/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ def init_notebook_plotting(offline: bool = False) -> None:
display_bundle = {"text/html": _wrap_js(_js_requires(offline=offline))}
display(display_bundle, raw=True)
logger.info("Injecting Plotly library into cell. Do not overwrite or delete cell.")
logger.info(
"""
Please see
(https://ax.dev/tutorials/visualizations.html#Fix-for-plots-that-are-not-rendering)
if visualizations are not rendering.
""".strip()
)
init_notebook_mode()


Expand Down
Loading

0 comments on commit 02e4ce8

Please sign in to comment.