-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
reproducible orca running image tests #3237
Conversation
Very nice work @antoinerg! Does the parallelism work locally, based on the number of cores on the local machine? 🙏 I see a step pushing artifacts, but I can't actually find them in the test results - are they there and I'm just not finding them? There's a lot to look at in the image outputs, and we want to be extremely careful since it's updating every mock we have! In the SVG mocks, the only substantial change I see is in the fonts: some have very different sizing and some don't seem to be recognized in orca at all. Here's onion skin halfway between the two: In WebGL the biggest thing I see is that all markers got substantially bigger (in both 2D and 3D). Onion skin again: There's one issue in GL3D that seems to have been fixed here though! Some of our baselines don't correctly rotate tick labels. See for example |
Thank you @alexcjohnson !
Although the script to do so is not here yet, yes it would work by running one container per core in parallel! FIY, running a bunch of Orcas in parallel in the same Docker container was not reliable in my experience. I will add a script to do so if we end up adopting Orca. Note that some gl3d mocks require quite a bit memory to render (maybe 1GB) so we may not want to run 8 at a time on a laptop.
They are in there: https://circleci.com/gh/plotly/plotly.js/18671#artifacts/containers/0
When I build the Docker image, I need to install all the fonts we would like to support. As of right now, I just copied the ones from Orca's Dockerfile: https://github.com/plotly/orca/blob/a0e7314a784802b4824b359aeff891e0d40be184/deployment/Dockerfile#L51-L77
Nice find 🔍 ! It's true that the markers are rendered bigger than they should as clearly shown in gl2d_fill_trace_tozero_order. I think you're right: the browser makes an OpenGL call that is rendered oddly by this software implementation of OpenGL. Either we're using an old badly supported GL call (like we do here gl-vis/gl-error3d#5) or the software renderer needs to be updated/improved. Thanks for the review! I guess the interim conclusion is that the current solution is exactly reproducible but not yet accurate 🤔 |
80730ed
to
799d64a
Compare
cd76e85
to
b3b56c3
Compare
About fonts, the Droid fonts do not get downloaded when building Orca's Dockerfile so I opened an issue over there plotly/orca#146. When building |
I am hopeful we can fix the issue with fonts or at least get close enough. I think I'm only missing "Courier New" as you can see in this onion skin halfway between the two: The updated baselines are in commit 9779c46! |
I found out the reason why the markers are rendered bigger in WebGL!
gl_PointSize = 2. * size * pixelRatio;
plotGlPixelRatio: 2.5, By forcing it to be 2, the markers are now correctly sized: I will push a new set of baselines with this change! |
d15b171
to
9779c46
Compare
Oh wow, that's a problem, nice find! But the fix is not to force orca to use the default value. So was |
No I don't think it's already included in variable
I am under the impression that we've always been rendering plots with
Ok thanks for the explanation! I will test this out and open an issue if it doesn't behave as such.
I did even worse in my last commit: I forced the value to be 2 in plotly.js itself. This was just for testing however. We should fix the aforementioned issue! At the very least this PR will have allow us to uncover a bug 🪲 🔍! Thank you @alexcjohnson |
@etpinard That's exactly what I still think we should do here: gl-vis/regl-scatter2d#20. |
@antoinerg regarding gl2d marker sizes are fixed in #5093. FYI - I simply checked the item in the PR description. |
Closing now that #5724 merged. |
This is a WIP proof of principle showcasing that Orca can yield reproducible output when running a software implementation of OpenGL. In this branch, test images generated on the CI are compared with baselines generated on my laptop with a tolerance of zero.
Because this is software OpenGL, a lot more CPU time is needed. On one core, running the test took roughly 20-30 minutes. By making use of 8 parallel containers, this time is cut down to ~5 minutes which is faster than the Jasmine tests we currently have.
To do:
npm run (test-image|baseline)
andnpm run docker
and make sure they run in parallelplotly.js
in thebuild
folder instead of using latest.test_images_diff
that are exactly the same.mapbox
supportmathjax
supportAccuracy issue: