Skip to content
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

Update download_frog_tissue examples #5706

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

user27182
Copy link
Contributor

@user27182 user27182 commented Feb 29, 2024

Fix Add workaround for #5291 This is also a first step toward fixing the related flaky tests for pack_labels / sort_labels from #5334. Cross ref to #5290.

For this PR:

  • Replace the call to plot_volume from download_frog_tissue with a call to contour_labeled instead to visualize the labels
  • Simplify and move the plot_volume version of the download_frog_tissue docstring example to the examples in volume.py
    • Add a plot_volume regression test for this example

NOTE:

  • The regression tests revealed that there are fundamental issues with calling plot_volume for this example with mapper='gpu' and shade=True for vtk < 9.3. This means that the regression tests still fail for these cases, so the issue with Wrong number of labels in download_frog_tissue example. #5291 isn't directly fixed.

@github-actions github-actions bot added the maintenance Low-impact maintenance activity label Feb 29, 2024
Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.25%. Comparing base (bf1520b) to head (e3eba16).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5706      +/-   ##
==========================================
- Coverage   96.54%   96.25%   -0.29%     
==========================================
  Files         137      137              
  Lines       23327    23395      +68     
==========================================
- Hits        22521    22520       -1     
- Misses        806      875      +69     

@user27182
Copy link
Contributor Author

Failed plotting tests summary:

Linux (3.8,9.0.3)
RuntimeError: test_frog_tissue_plot Exceeded image regression error of 500.0 with an image error equal to: 8895.775163398812

Linux (3.9,9.1)
RuntimeError: test_frog_tissue_plot Exceeded image regression error of 500.0 with an image error equal to: 634.4758169934765

All Windows tests:

Windows fatal exception: Windows fatal exception: access violationaccess violation

Windows fatal exception: access violation

Thread 0x00000fa8 (most recent call first):
  File "C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\threading.py", line 359 in wait
  File Windows fatal exception: "access violationC:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\threading.py

", line 655 in wait
  File "C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\threading.py", line 1429 in run
  File "C:\hostedtoolcache\windows\Python\3.12.2\x64\Lib\threading.py", line 
tests/plotting/test_plotting.py::test_frog_tissue_plot 

@user27182
Copy link
Contributor Author

Linux (3.8,9.0.3) RuntimeError: test_frog_tissue_plot Exceeded image regression error of 500.0 with an image error equal to: 8895.775163398812

Something very wrong here, but these are older versions, I don't think this would be the cause of the #5291 since I think the docs are built with latest versions (maybe)

Linux (3.9,9.1) RuntimeError: test_frog_tissue_plot Exceeded image regression error of 500.0 with an image error equal to: 634.4758169934765

This error is relatively small, this may be caused by differences in rendering (e.g. slightly more reflective surface) across vtk versions.

All Windows tests:
Windows fatal exception: Windows fatal exception: access violationaccess violation

I think there may be a machine-specific issue for the Windows tests. Setting shade=True for add_volume results in all Windows tests failing with error above. The tests pass when shade=False. But, I was able to test locally on a Windows machine, and shade=True works fine. So this error is not applicable to all Windows machines.

@user27182 user27182 changed the title Add download_frog_tissue regression test Update frog_tissue examples and fix related flaky tests Feb 29, 2024
@user27182 user27182 changed the title Update frog_tissue examples and fix related flaky tests Update download_frog_tissue examples Feb 29, 2024
@user27182
Copy link
Contributor Author

github-actions preview

@user27182
Copy link
Contributor Author

github-actions preview

Copy link
Contributor

@user27182
Copy link
Contributor Author

Example with plot_volume moved to Volume Rendering examples in the docs. Has correct number of labels (29) but stil has visual artefacts

image

Modified download_frog_tissue docstring example which plots mesh contours instead of using plot_volume. Still shows the incorrect number of labels.

image

@user27182 user27182 marked this pull request as draft February 29, 2024 18:41
@user27182
Copy link
Contributor Author

Marking as draft since it's clear the workarounds added here don't yet fix #5291. Perhaps the issue is with the MHD file reader for specific builds?

I'm thinking perhaps we should convert this dataset to another format, or just try to fix it up somehow, and re-upload it as a new dataset.

@user27182
Copy link
Contributor Author

github-actions preview

Copy link
Contributor

github-actions bot commented Mar 1, 2024

@user27182
Copy link
Contributor Author

github-actions preview

Copy link
Contributor

github-actions bot commented Mar 1, 2024

@user27182
Copy link
Contributor Author

122 labels each now, still not fixed
image

image

@user27182
Copy link
Contributor Author

github-actions preview

Copy link
Contributor

github-actions bot commented Mar 1, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Low-impact maintenance activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant