Enforce resampling texture for set_environment_texture with CI#7357
Enforce resampling texture for set_environment_texture with CI#7357tkoyama010 merged 62 commits intomainfrom
set_environment_texture with CI#7357Conversation
|
doctests run in ~19 minutes now instead of ~55 minutes. This confirms that |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7357 +/- ##
=======================================
Coverage 96.05% 96.06%
=======================================
Files 149 149
Lines 30577 30599 +22
Branches 4009 4012 +3
=======================================
+ Hits 29372 29394 +22
Misses 572 572
Partials 633 633 |
|
I have a working fix. I am not sure how we want to roll this out. Some options:
|
Weird, the addition from b0657c0 should be be run before and after every example. |
|
It seems likely to me that the theme set in |
Yes you're right, the gallery has before and after events which run I had another look through Lines 503 to 508 in a43b10f This is a strong signal that a new documentation-build theme from #7389 may be needed here so that we can do: - __s_p_t('document')
+ __s_p_t('doc_build')(assuming we call the theme |
So many places that the theme has to be reset. Good find.
Even if there is a way to do it without the documentation-building theme, it is turning out to be a nightmare to keep all these pieces in sync, so I agree that #7389 is becoming higher priority. |
|
This is once again ready for review. The theme is now applied consistently for all document testing and building, and build time is < 2hrs, docstring tests about 25 mins. The build is expected to fail once more to generate new cache images but otherwise this PR should be good to go. |
new sampling rate is now 1/16 ( These are still among the slowest examples, but I think this is OK for now. This can also be tuned later if needed once we enable testing of the durations to enforce an upper limit. |
There was a problem hiding this comment.
Why are these images changed? They look much better, but it looks unrelated to resampling?
There was a problem hiding this comment.
Don't really know, but the implementation for set_environment_texture now uses SetBackground, perhaps it's related to that change? This could be related to #5813 as well, where perhaps some textures only appear red under specific circumstances.
For this particular example, download_dikhololo_night() texture is used for the environment texture. If we download that and do a simple texture.plot(), it too appears as a red rectangle. And so previously, a pure red image was being used for rendering the reflections, but now maybe we fixed this, and the environment texture is being rendered correctly with SetBackground.
There was a problem hiding this comment.
There is also a pure red square that is fixed in this PR, so good enough for me.
Overview
This method seems to hang in CI and increases docstring tests times and doc build times considerably. See #6993 (comment)
This PR:
resampleoption toset_environment_textureto resample the texture to reduce the complexity of the renderingresample_environment_texturefor enabling this globally'document_build'to standardize the use of this option in CIDoc build now takes 1hr 45 mins (down from 3 hrs)
Docstring tests now take 25 mins (down from 55 mins)