GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — simplify screenshot testing by kushalkolar · Pull Request #447 · fastplotlib/fastplotlib

Conversation

@kushalkolar

@kushalkolar kushalkolar commented Mar 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

use ideas from pygfx/pygfx#684

closes #446
A threshold of 0.2 seemed like it was too lenient, I was able to change the color of one of the circles in the line collection examples and the RMSE was 0.09

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kushalkolar
rgb and rmse funcs work
d6f0504
@kushalkolar
kushalkolar marked this pull request as ready for review March 23, 2024 04:24
@kushalkolar
kushalkolar requested a review from clewis7 as a code owner March 23, 2024 04:24
@kushalkolar
increase screenshot rmse threshold to 0.025
644d534
@kushalkolar

kushalkolar commented Mar 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

This seems to work quite well. The ground truths were generated on my RX 570 at home, the largest diff was with the scatter_size example, due to the text. The diff on github actions was slightly over 0.02. I also tested on the GPUs on the Flatiron cluster, the diff for that example is 0.020826.

There seems to be no difference between the diffs on Nvidia Tesla V100 and Nvidia A100 on the cluster, at least Nvidia is consistent about one think I guess 😂

EDIT: Just tested on the Nvidia H100 and I get a max diff of 0.02077 on the scatter_size example. The diffs are a bit difference than on the V100 and A100 so I guess Nvidia actually isn't consistent.

diffs for all screenshots on a Tesla V100 on the Flatiron cluster for reference:
This is the diff between the Rx 570 and the overpowered Nvidia GPUs

examples/tests/test_examples.py::test_that_we_are_on_lavapipe DiscreteGPU Vulkan
examples/tests/test_examples.py::test_example_screenshots[gridplot] 0.0025418061938043534
examples/tests/test_examples.py::test_example_screenshots[gridplot_non_square] 0.0017253794384335269
examples/tests/test_examples.py::test_example_screenshots[heatmap] 0.0026005766798322047
examples/tests/test_examples.py::test_example_screenshots[heatmap_cmap] 0.002662877302239744
examples/tests/test_examples.py::test_example_screenshots[heatmap_data] 0.0020797810741957933
examples/tests/test_examples.py::test_example_screenshots[heatmap_vmin_vmax] 0.002914066889570422
examples/tests/test_examples.py::test_example_screenshots[image_cmap] 0.0019563093643064503
examples/tests/test_examples.py::test_example_screenshots[image_rgb] 0.0014489276911573798
examples/tests/test_examples.py::test_example_screenshots[image_rgbvminvmax] 0.0005612692156754262
examples/tests/test_examples.py::test_example_screenshots[image_simple] 0.0016309417498936698
examples/tests/test_examples.py::test_example_screenshots[image_vminvmax] 0.0005612692156754262
examples/tests/test_examples.py::test_example_screenshots[line] 0.0029302534153462386
examples/tests/test_examples.py::test_example_screenshots[line_cmap] 0.003085553070868819
examples/tests/test_examples.py::test_example_screenshots[line_colorslice] 0.0031247686572509034
examples/tests/test_examples.py::test_example_screenshots[line_dataslice] 0.0023580007672577286
examples/tests/test_examples.py::test_example_screenshots[line_present_scaling] 0.0027367853208208497
examples/tests/test_examples.py::test_example_screenshots[line_collection] 0.003779845416274792
examples/tests/test_examples.py::test_example_screenshots[line_collection_cmap_values] 0.0023366316256708897
examples/tests/test_examples.py::test_example_screenshots[line_collection_cmap_values_qualitative] 0.002891149865417338
examples/tests/test_examples.py::test_example_screenshots[line_collection_colors] 0.0`022398405285301453
examples/tests/test_examples.py::test_example_screenshots[line_stack] 0.005911900712291164
examples/tests/test_examples.py::test_example_screenshots[scatter] 0.012353324462660456
examples/tests/test_examples.py::test_example_screenshots[scatter_cmap] 0.0030825225024386587
examples/tests/test_examples.py::test_example_screenshots[scatter_colorslice] 0.004020251842124368
examples/tests/test_examples.py::test_example_screenshots[scatter_dataslice] 0.013067512988075274
examples/tests/test_examples.py::test_example_screenshots[scatter_present] 0.013810446602977897
examples/tests/test_examples.py::test_example_screenshots[scatter_size] 0.020826465412837777
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kushalkolar added 2 commits March 23, 2024 01:03
@kushalkolar
drop py3.9, add mac actions
a74ac48
@kushalkolar
workflow name
c16f4a4
kushalkolar
kushalkolar commented Mar 23, 2024
View reviewed changes
Comment thread examples/tests/test_examples.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Mar 23, 2024

Copy link
Copy Markdown
Member Author

So on Mac there seems to be large diffs with the heatmaps, no sure why, will figure out later.

diff-heatmap-rgb
diff-heatmap_cmap-rgb
diff-heatmap_data-rgb
diff-heatmap_vmin_vmax-rgb

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar
skip mac CI for now
145aad9
@kushalkolar

kushalkolar commented Mar 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

I think that we should figure out how to make the heatmap test screenshot have more of the actual heatmap, not sure why it's small in the top left corner.

Or maybe think about getting rid of heatmap since the Texture dimension limit seems to no longer apply with WGPU for the past while, need to investigate this 🤔

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar
kushalkolar requested a review from almarklein March 23, 2024 05:17
kushalkolar added 10 commits March 30, 2024 23:17
@kushalkolar
just use numpy to convert RGBA -> RGB
27f02b5
@kushalkolar
rgb for nb tests
62d1874
@kushalkolar
Merge branch 'main' into simplify-screenshot-testing
462a7c8
@kushalkolar
forgot to remove rgba screenshot saving for nb
199c5d0
@kushalkolar
Merge branch 'simplify-screenshot-testing' of https://github.com/fast…
df7bfac
…plotlib/fastplotlib into simplify-screenshot-testing
@kushalkolar
forgot to add rmse to nb test utils
3115ffe
@kushalkolar
more tweaks
0c89c51
@kushalkolar
allow setting rmse tolerance for nb tests
b1d1def
@kushalkolar
use slightly higher tolerance for iw nb tests
0638e61
@kushalkolar
proper way to set tolerance for nb
2b1f714
@kushalkolar
kushalkolar merged commit 9a1bfbe into main Mar 31, 2024
@kushalkolar
kushalkolar deleted the simplify-screenshot-testing branch March 31, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@clewis7 clewis7 Awaiting requested review from clewis7 clewis7 is a code owner
@almarklein almarklein Awaiting requested review from almarklein

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

better image comparison for tests

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@kushalkolar @almarklein
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.