-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visualization in tutorial not working in colab and remote setup #306
Comments
Thanks for flagging this, @SebastianRiechert! I've asked @2timesjay, who's most familiar with this part of the code, to look into it. |
Hi @SebastianRiechert , the discussion on #332 lead to the solution for the jupyterlab half of this issue.
The colab issue is unexpected: https://stackoverflow.com/questions/47230817/plotly-notebook-mode-with-google-colaboratory describes the issue as resulting from using older plotly versions, but we're on plotly >4.4 and still running into it. While I investigate further, the workaround from the top answer there DOES work in colab. |
Closing as duplicate, let's direct all future discussion of this issue to #332. |
Still investigating colab half of this issue (realized this one was the right one to host discussion on). |
Support for Colab is considered wishlist for now, porting this to #566. |
Workaround for making Ax plots work in colab is a function like this (source: https://stackoverflow.com/questions/47230817/plotly-notebook-mode-with-google-colaboratory, this seems to apply to Plotly verstions 3.x overall):
So you would call that function before rendering a plot, e.g.:
We'll incorporate this into a convenient utility soon as well (maybe just making it part of |
Here's a simple workaround. Add
to the NB running on colab. The figure renders and is interactive :) (for smaller notebook file size at the expense of non-interactive plots, you can use "png" as the renderer) Note: You also need to do |
This is now covered in documentation: https://ax.dev/tutorials/visualizations.html#Fix-for-plots-that-are-not-rendering and a warning will be raised in the code directing users to the documentation. @septfreur, @sgbaird, @SebastianRiechert FYI |
I have tried running this tutorial both in google colab and in jupyterlab on a remote server setup.
https://ax.dev/tutorials/tune_cnn.html
Both times the render()-call returns an empty output.
This is the code, no changes from tutorial except installation of ax:
switching to classic jupyter notebook (in remote setup) as suggested in #94 doesn't change anything.
pip freezes for both environments:
colab_pip_freeze.txt
jupyterlab_pip_freeze.txt
The text was updated successfully, but these errors were encountered: