-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
TST: Eva: Speed up consistency tests #2224
TST: Eva: Speed up consistency tests #2224
Conversation
The EVA consistency tests are currently among the slowest tests overall, taking roughly 4x 50 sec with an overall test runtime of 15-20 min, so they make up a significant fraction of that runtime. With this PR, the number of iterations until convergence is reduced by passing a lower tau value. Testing locally, the similarity threshold is still crossed for the tests to pass, so this change should be good. Besides this change, I made some smaller adjustments to EVA: - break long lines - use keyword arguments for initializing SVDHook - hide progress bar in tests
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Locally, higher threshold works, but on CI it fails.
@sirluk I wanted to speed up some of the slow EVA tests and this is what I came up with. Do these changes make sense to you? Do you have other suggestions how to speed these tests up? |
@BenjaminBossan great, these changes definitely make sense. I think for testing purposes a lower |
I was thinking about that but was unsure how important this would be for the validity of the tests. Unfortunately, going down to 2 seeds makes the tests fail because similarity drops to 0.5720. This is surprising to me, as I thought that using 2 seeds would run a subset of the tests, but as the means are taken, that's not quite true. When inspecting the generated cos sims, there appears to be quite a lot of variance, do you think that's expected?
(this is for |
ping @sirluk |
@BenjaminBossan I will investigate this and get back to you |
@BenjaminBossan The reason is like because singular vectors are unique up to their sign between different runs. This does not effect the performance but effects the cosine similarity between different runs. It is probably better for this test if we take compute the cosine similarity of the absolute values. That should fix the issue |
Thanks for figuring this out @sirluk. I made some adjustments, LMK if that makes sense. I verified that with these changes, we get rid of the close to 0 similarities we saw before. |
thanks for improving the eva tests, looks good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
The EVA consistency tests are currently among the slowest tests overall, taking roughly 4x 50 sec with an overall test runtime of 15-20 min, so they make up a significant fraction of that runtime.
With this PR, the number of iterations until convergence is reduced by passing a lower tau value.
Testing locally, the similarity threshold is still crossed for the tests to pass, so this change should be good.On CI, the similarity threshold had to be reduced a bit for the tests still to pass.Overall, this cuts the runtime ~20 sec or less. Thus they're still slow but it's a noticeable difference.
Besides this change, I made some smaller adjustments to EVA:
SVDHook