-
Notifications
You must be signed in to change notification settings - Fork 3
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
Smoke Tests Fail due to tolerances on my machine #217
Comments
@emersodb is this still an issue? Or, can we close this? |
Yes, it's still an issue I believe. Shawn runs smokes on his machine through the GPU by default and there appears to be different numerical fluctuations on the NVIDIA hardware than on CPU. So a few of our smokes fail. It's not a dealbreaker, because our remote smokes run on CPUs. So it hasn't been prioritized. It's likely an easy fix, just hasn't been addressed. |
Can confirm this is still an issue on the current master branch. |
Oh interesting. Should we just hardcode the device to CPU for these smoke tests? |
We do want them to work on both I suppose? Once in a while there are gotchas that only come up when you run them on GPU. Shawn found one or two of these at one point when he was doing local debugging. Perhaps we can adjust the tolerances depending on the device type detected. |
Makes sense. Ya, was going to say that next. Something like parametrize the tests with device, and expected tolerance. I can take a look into this today. As a means to get more ramped up on the codebase but also clear outstanding issues :) |
Tested out the new smoke test pytests on my machine following PR 314 and received 4 failures all due to being outside tolerances. In the PR it says the tolerance was loosened to 0.1 but on my machine the tests are saying that the tolerance is 0.0005. Perhaps some tests were missed. Here is the summarized output FAILED tests/smoke_tests/test_smoke_tests.py::test_basic_server_client_cifar - AssertionError: Server metrics check failed. Errors: ["Saved value for metric 'val - prediction - accuracy' (0.1046) does not match the requested value (0.1031) within requested tolerance (0.0005).", "Saved value for metric 'test - prediction - accuracy' (0.1018) does not match the requested value (0.1039) within requested tolerance (0...
FAILED tests/smoke_tests/test_smoke_tests.py::test_scaffold - AssertionError: Server metrics check failed. Errors: ["Saved value for metric 'val - prediction - accuracy' (0.40755555555555556) does not match the requested value (0.4062) within requested tolerance (0.0005)."]
FAILED tests/smoke_tests/test_smoke_tests.py::test_apfl - AssertionError: Server metrics check failed. Errors: ["Saved value for metric 'val - personal - accuracy' (0.5255555555555556) does not match the requested value (0.5269) within requested tolerance (0.0005).", "Saved value for metric 'val - global - accuracy' (0.5414444444444444) does not match the requested value (0.5331) within reque...
FAILED tests/smoke_tests/test_smoke_tests.py::test_feddg_ga - AssertionError: Server metrics check failed. Errors: ["Saved value for metric 'val - personal - accuracy' (0.5255555555555556) does not match the requested value (0.5269) within requested tolerance (0.0005).", "Saved value for metric 'val - global - accuracy' (0.5414444444444444) does not match the requested value (0.5331) within reque...
|
@scarere: We ended up reverting the default tolerance bump back to 0.0005. That would be a pretty high tolerance that would sort of kill the tests utility a bit. We haven't done it yet, but we're hoping to have some device and perhaps os specific targets for these metrics. For example, even when running strictly on CPUs, the APFL and FedDG-GA smokes fail locally on my machine but are okay on the github Ubuntu machines. It looks like using a GPU adds two other smokes that need tweaking. |
@emersodb Yeah I agree that 0.1 is too high of a tolerance. I was talking to @nerdai about this in the slack and generating os/device specific targets might turn into an endless game of running the tests on more and more device configurations to generate more and more targets for each test. I think as a temporary fix Andrei suggested having custom tolerances based on the device. Based on the test results I got I think we could get away with a tolerance of 0.005 o cuda devices, one order of magnitude larger. Although if you're getting failures on cpu from machine to machine then maybe loosening default tolerance to 0.005 for all machines is a better solution as long as that isn't too high for your liking |
For some reason smoke tests fail locally due to results being outside tolerances. Tried starting from a fresh environment and the issue persists. Not urgent but worth looking into eventually. Creating an issue so that I don't forget about it.
System Info
13th Gen Intel® Core™ i9-13900K × 32
Ubuntu 22.04.4 LTS
NVIDIA GeForce RTX 4090
Driver Version: 555.42.06
Cuda Version: 12.1
Python Version: 3.9.19
Steps to recreate
Output
The text was updated successfully, but these errors were encountered: