-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
disable calls to plotly.io.show when running on Azure #5446
Conversation
…ts on Azure define environment variable: SKIMAGE_DISABLE_PLOTLY_SHOW to enable this
This seems to have worked. I manually started the Azure job a second time here to check that we didn't just get lucky. @mkcor, the timeouts that have been common on Azure in recent weeks seem to have been related to the plotly.io.show calls I had asked you to add to the examples. This PR bypasses those when running the Azure gallery testing job. I tried this with a gallery example, but let me know if you are aware of anything else in Plotly itself. |
A second option would be replacing calls to show() with |
@grlee77 The problem I have with this is that it makes the gallery examples uglier, for something that is a mild problem from the developer side. I'm not sure on balance it is a good change. I think I would prefer writing a tool in our |
revert introduction of SKIMAGE_DISABLE_PLOTLY_SHOW env var
I agree that it makes those examples more ugly. I reverted the environment variable and instead use a one line sed-based solution in 0e2dc2a. |
CI is green for the The only change to an example script now is adding the show commands to |
ping @jni |
# Comment out any plotly.io.show() calls before running the example. | ||
# Plotly opens a web browser, which often seemed to cause the CI to | ||
# hang and timeout. | ||
sed -i 's/plotly.io.show/# plotly.io.show/g' ${f} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this non-invasive workaround 🙂
I think these timeouts would happen (sometimes) even without the plotly.io.show calls: Plotly figures by themselves can make the generated HTML files pretty heavy. When building the example gallery locally, I've noticed the slowdown caused by Plotly figures, regardless of the renderer.
Okay.
Not really; I haven't followed closely beyond plotly/plotly.py#1577 by @emmanuelle. I didn't know of I know that, here, scikit-image/doc/source/conf.py Line 155 in 6ff11f6
we want 'sphinx_gallery_png' rather than 'sphinx_gallery' so that gallery thumbnails display well. The other renderer candidates don't seem fitting. |
@mkcor: I have addressed the comments. CI is still running, but the relevant Azure jobs have already passed. |
Yay! Thanks. Since this is a CI+docs PR, can I go ahead and merge? |
We addressed Juan's original objection to the environment variable, so I say go for it! |
Description
It has been a common occurance lately for the CI job on Azure that involves gallery testing to timeout.
I have a suspicion that this is somehow related to Plotly, but haven't confirmed that for sure yet.
In this PR, I try defining environment variable:
SKIMAGE_DISABLE_PLOTLY_SHOW
to disable itThis environment variable is only exported during Gallery testing on Azure, so users should still get the plots popping up in their browser if running the scripts from the command line.
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.