-
Notifications
You must be signed in to change notification settings - Fork 12
Add xdist to image compare #266
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
Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
On the GHA we are running automatically with two workers, not sure if we can force it to use more -- it's not much but it's something I guess. Locally it runs much faster. |
For the RNGs, I wonder if something in pytest is getting the fixtures confused. Maybe we move to making the RNGs directly within each test? |
I am creating a new rng for each thread now. |
I am still expecting the tests will fail when comparing with main. Race conditions are gone locally 🥳 and the test suite is more robust. I may wanna move the plugin to another repo outside the main repository as it contains a lot more code than I was expecting when I started working on it. |
I think the new rng test fixture is using a different effective seed. We should figure that out. |
Should be the same no? See UltraPlot/ultraplot/tests/conftest.py Line 11 in f0bd292
|
I think this line
may need to be
The image comparison tests are failing right now because the data in them is different. So something broke. |
I believe these are the same for numpy, i.e. the default rng is |
Ohhhh I thought it was the MT one. Hrrmmmmm ok. We need to figure out why the tests now differ. |
I am suspecting that the seed was not properly resetting in its current implementation which makes comparison hard as we don't know when a thread runs a particular test (the racing condition). I can confirm that generating the baseline from the PR and then running a comparison on that data will always match which indicates that the racing condition is not the problem, but the comparison with main will still fail. I think what we could do is first merge a PR that ensures the numpy rng is set properly on main and then re-compare this with this PR, what do you think? |
I will do that now -- time permitting. At least this PR is working with xdist now nicely which is great and the speed ups are very nice for local development 💯 |
I am going ahead an merging this as the issue is again related to the rng generation. I will confirm with the merged results offline is the issue still persists. |
for more information, see https://pre-commit.ci
Found no issues other than then network layout not properly passing the seed, see #256 |
This reverts commit 500e45b.
This is a continuation of #190.
I added some supporting code to conftest to allow our tests to run in parallel. In addition it adds a custom html to show the results and is compliant with our approach of only keeping the failed images.
I also sorted the dependencies alphabetically in environment.yml to reduce my OCD ;-)