-
-
Notifications
You must be signed in to change notification settings - Fork 558
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
Add GridSearchColorPlot tests + minor gridsearch change, part of #308 #1097
base: develop
Are you sure you want to change the base?
Conversation
Sets up tests/test_gridsearch with basic tests based on sample .ipynb. Only one change to gridsearch code (quick method return changed from None to visualizer).
The Travis CI builds that use a regular Python distro pass, but those using Miniconda fail, due to failures on the image similarity tests I wrote. I'm not sure why, as the base images I committed seem to be in good order. Would need some help from core contributors on this. |
@tktran I'd be happy to help with the baseline images issue: it turns out that prebuilt images on Miniconda and Windows may have minor variations in how they render images, slightly different fonts, aliases, etc. When we test images we compute the root mean square difference (RMS) of the generated image and the baseline; if the RMS is 0, then the images are exactly alike, and the larger the RMS, the more different the images are. Luckily, in this case, we can use the RMS as a tolerance, giving us some flexibility to test across these slight variations. In your tests, you can modify the tolerance as follows: # RMS on Miniconda of 0.987
self.assert_images_similar(viz, tol=0.5, windows_tol=1.25) Note that you can specify two tolerances, the default tolerance Below are the tests, the RMS on miniconda, and my recommended tolerance value. Please do include a comment as in the above example, but feel free to omit
I hope that helps get the tests sorted, let me know if you have any questions! Thank you so much for contributing to Yellowbrick! Also, when the tests pass and you're ready for us to review - please ping us to let us know! I've marked this PR as a draft in the meantime, just for our own organizational purposes. |
@bbengfort Hello, thanks for your help - your time invested explaining this aspect of testing to me won't go to waste going forward. The CI checks have passed now, so I would like to say that this PR is ready for merging. |
@tktran excellent, thank you so much for your hard work on this! I'll take a look as soon as I can! |
This PR partially addresses #308.
Changes:
Still to do:
CHECKLIST
pytest
?