-
Notifications
You must be signed in to change notification settings - Fork 129
Remove reimplementation of np.testing.assert_allclose #562
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
base: main
Are you sure you want to change the base?
Conversation
Seems like the rtol/atol values may need to be tweaked slightly, as some tests are now failing |
Potentially dumb question, is that something I need to do? |
Yes, we can only merge the changes if all tests pass. You can see which tests failed here on GitHub |
Oh ok yeah I just wasn't sure what the atol and rtol values were and if that was something I was supposed to modify. But I'll look and see which tests failed and why. Thanks! |
Ok I fixed up some remaining calls to the old unittest_tools assert_allclose function and fixed some typos I had introduced. On the rtol and atol issues, in the current unittest_tools assert_allclose function, the default values for those are set to 'None'. That is
Should I also pass 'None' to the np.testing.assert_allclose function calls (assuming that's allowed)? |
Instead of none, we should not specify them at all (unless the test fails, then we need to tweak them) |
If things get out of hand, the default atol and rtol were being defined here: pytensor/pytensor/tensor/math.py Line 102 in 0ebc83b
And used here: pytensor/pytensor/tensor/math.py Line 117 in 0ebc83b
|
Hi @jaharvey8 Are you still working on this PR? I'd like to take it up if you are not. |
Description
I think I got all the unittest_tools.assert_allclose instances
The following files no longer used functions from unittest_tools so I removed the import
tests/link/test_vm.py
tests/tensor/test_variable.py
tests/scalar/test_basic.py
tests/sparse/test_rewriting.py
tests/link/c/test_params_type.py
tests/tensor/rewriting/test_elemwise.py
There was a mention of utt.assert_all close in the creating_an_op document file so I changed that as well.
Related Issue
np.testing.assert_allclose
#551Checklist
Type of change