Hi, I am trying to run defined unit tests, and I think there is a problem with the deprecated interp2d method in Scipy (which was removed in 1.14.0) that is failing the test_scipy.py. Can you provide which version of Scipy is safe to use? Thanks.
Steps to reproduce
I am using a conda environment. You can use this command to reproduce the test failure.
python isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py
Additional context
python isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py command output when scipy is 1.14.0.
$ python isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py
test_interpolation (__main__.TestScipyOperations)
Test scipy interpolation 2D method. ... ERROR
======================================================================
ERROR: test_interpolation (__main__.TestScipyOperations)
Test scipy interpolation 2D method.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/burak.demirbilek/Documents/rl-framework/isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py", line 55, in test_interpolation
func_interp2d = interpolate.interp2d(y, x, height_field_downsampled, kind="cubic")
File "/home/burak.demirbilek/miniconda3/envs/rl_framework/lib/python3.10/site-packages/scipy/interpolate/_interpolate.py", line 129, in __init__
raise NotImplementedError(err_mesg)
NotImplementedError: `interp2d` has been removed in SciPy 1.14.0.
For legacy code, nearly bug-for-bug compatible replacements are
`RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
scattered 2D data.
In new code, for regular grids use `RegularGridInterpolator` instead.
For scattered data, prefer `LinearNDInterpolator` or
`CloughTocher2DInterpolator`.
For more details see
https://scipy.github.io/devdocs/tutorial/interpolate/interp_transition_guide.html
----------------------------------------------------------------------
Ran 1 test in 0.001s
FAILED (errors=1)
After downgrading scipy to 1.13.1, this unit test is still failing.
python isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py
test_interpolation (__main__.TestScipyOperations)
Test scipy interpolation 2D method. ... /home/burak.demirbilek/Documents/rl-framework/isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py:55: DeprecationWarning: `interp2d` is deprecated in SciPy 1.10 and will be removed in SciPy 1.14.0.
For legacy code, nearly bug-for-bug compatible replacements are
`RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
scattered 2D data.
In new code, for regular grids use `RegularGridInterpolator` instead.
For scattered data, prefer `LinearNDInterpolator` or
`CloughTocher2DInterpolator`.
For more details see
`https://scipy.github.io/devdocs/notebooks/interp_transition_guide.html`
func_interp2d = interpolate.interp2d(y, x, height_field_downsampled, kind="cubic")
/home/burak.demirbilek/Documents/rl-framework/isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py:56: DeprecationWarning: `interp2d` is deprecated in SciPy 1.10 and will be removed in SciPy 1.14.0.
For legacy code, nearly bug-for-bug compatible replacements are
`RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
scattered 2D data.
In new code, for regular grids use `RegularGridInterpolator` instead.
For scattered data, prefer `LinearNDInterpolator` or
`CloughTocher2DInterpolator`.
For more details see
`https://scipy.github.io/devdocs/notebooks/interp_transition_guide.html`
z_upsampled_interp2d = func_interp2d(y_upsampled, x_upsampled)
FAIL
======================================================================
FAIL: test_interpolation (__main__.TestScipyOperations)
Test scipy interpolation 2D method.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/burak.demirbilek/Documents/rl-framework/isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py", line 70, in test_interpolation
np.testing.assert_allclose(z_upsampled_RectBivariant, z_upsampled_RegularGridInterpolator, atol=1e-14)
File "/home/burak.demirbilek/miniconda3/envs/rl_framework/lib/python3.10/site-packages/numpy/testing/_private/utils.py", line 1504, in assert_allclose
assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
File "/home/burak.demirbilek/miniconda3/envs/rl_framework/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/home/burak.demirbilek/miniconda3/envs/rl_framework/lib/python3.10/site-packages/numpy/testing/_private/utils.py", line 797, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=1e-07, atol=1e-14
Mismatched elements: 11779 / 12000 (98.2%)
Max absolute difference: 0.0007767
Max relative difference: 0.42222691
x: array([[ 4. , 13.863408, 19.930661, ..., 4.03692 , 7.169014,
12. ],
[-8.654133, 19.978647, 19.365613, ..., 8.519592, 16.029264,...
y: array([[ 4.000001, 13.863321, 19.930564, ..., 4.036756, 7.168875,
12.000002],
[-8.65405 , 19.977871, 19.365 , ..., 8.519612, 16.029187,...
----------------------------------------------------------------------
Ran 1 test in 0.027s
FAILED (failures=1)
Lastly, this is the overall results for all unit tests, only the test_scipy.py test fails. (scipy==1.13.1)
Describe the bug
Hi, I am trying to run defined unit tests, and I think there is a problem with the deprecated
interp2d
method in Scipy (which was removed in 1.14.0) that is failing the test_scipy.py. Can you provide which version of Scipy is safe to use? Thanks.Steps to reproduce
I am using a conda environment. You can use this command to reproduce the test failure.
python isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py
Additional context
python isaaclab/source/extensions/omni.isaac.lab/test/deps/test_scipy.py
command output when scipy is 1.14.0.After downgrading scipy to 1.13.1, this unit test is still failing.
Lastly, this is the overall results for all unit tests, only the test_scipy.py test fails. (scipy==1.13.1)