Skip to content
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: Several AssertionErrors in tests on aarch64-linux #780

Open
GaetanLepage opened this issue Jun 17, 2024 · 3 comments
Open

TST: Several AssertionErrors in tests on aarch64-linux #780

GaetanLepage opened this issue Jun 17, 2024 · 3 comments
Labels
bug Something isn't working test Test related changes

Comments

@GaetanLepage
Copy link

GaetanLepage commented Jun 17, 2024

Code Sample, a copy-pastable example if possible

Context: maintaining the python311Packages.rioxarray package on nixpkgs: NixOS/nixpkgs#320524

A few tests fail on aarch64-linux with AssertionError. No issue was found on x86_64-linux.

pytest

Problem description

Excerpt of the log:

args = (<function assert_array_almost_equal.<locals>.compare at 0xffff5d6b7f60>, array([[[30692, 30696, 30699, 30702, 30704, ..., 30617, 30619, 30621],
        [30611, 30610, 30610, 30610, 30610, 30611, 30612, 30614, 30616]]],
      dtype=uint16))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 7 decimals', 'precision': 7, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 7 decimals
E           
E           Mismatched elements: 375 / 441 (85%)
E           Max absolute difference: 7
E           Max relative difference: 0.00022836
E            x: array([[[30692, 30696, 30699, 30702, 30704, 30705, 30705, 30704, 30703],
E                   [30690, 30694, 30697, 30700, 30703, 30705, 30704, 30704, 30703],
E                   [30687, 30692, 30695, 30699, 30703, 30704, 30703, 30702, 30701],...
E            y: array([[[30696, 30699, 30702, 30704, 30705, 30705, 30704, 30703, 30701],
E                   [30694, 30697, 30700, 30703, 30705, 30704, 30704, 30703, 30700],
E                   [30692, 30695, 30699, 30703, 30704, 30703, 30702, 30701, 30698],...

/nix/store/q3x28mimkawkdjlvd78jxv3s0fk25vz8-python3-3.11.9/lib/python3.11/contextlib.py:81: AssertionError

Full log: https://pastebin.com/HaYxS5ZV

Expected Output

Tests are all successful.

Environment Information

  • python -c "import rioxarray; rioxarray.show_versions()"
rioxarray (0.15.5) deps:
  rasterio: 1.3.10
    xarray: 2024.2.0
      GDAL: 3.8.5
      GEOS: 3.12.1
      PROJ: 9.4.1
 PROJ DATA: /tmp/proj:/nix/store/ba589n2q0hqwgv1xcksvrmaw92cx0ara-proj-9.4.1/share/proj:/nix/store/ba589n2q0hqwgv1xcksvrmaw92cx0ara-proj-9.4.1/share/proj
 GDAL DATA: None

Other python deps:
     scipy: None
    pyproj: 3.6.1

System:
    python: 3.11.9 (main, Apr  2 2024, 08:25:04) [GCC 13.3.0]
executable: /nix/store/q3x28mimkawkdjlvd78jxv3s0fk25vz8-python3-3.11.9/bin/python
   machine: Linux-5.15.158-aarch64-with-glibc2.39
@GaetanLepage GaetanLepage added the bug Something isn't working label Jun 17, 2024
@GaetanLepage
Copy link
Author

Maybe slightly relaxing the expected precision of those checks could be relevant.

@snowman2
Copy link
Member

Looks like the data is shifted one cell over.

@snowman2 snowman2 added the test Test related changes label Jun 21, 2024
@snowman2 snowman2 changed the title [BUG] Several AssertionErrors in tests on aarch64-linux TST: Several AssertionErrors in tests on aarch64-linux Jun 21, 2024
@schrobingus
Copy link

schrobingus commented Aug 2, 2024

These same test issues also seem to be occurring on Nix for aarch64-darwin, or macOS.

=========================== short test summary info ============================
FAILED test/integration/test_integration__io.py::test_open_rasterio_mask_chunk_clip - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_rasterio-True] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_rasterio-False] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func1-True] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func1-False] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func2-True] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func2-False] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func3-True] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func3-False] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func4-True] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func4-False] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func5-True] - AssertionError:
FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func5-False] - AssertionError:
= 13 failed, 440 passed, 17 skipped, 8 deselected, 1 xfailed, 3 xpassed, 385 warnings in 13.64s =
/nix/store/89ghmy7qxyggz4sycc9qr1klinmrlgbx-stdenv-darwin/setup: line 1650: pop_var_context: head of shell_variables not a function context
error: builder for '/nix/store/zcf3qwcfb8kpcxqz5h9hg5xjp3x8gh7c-python3.12-rioxarray-0.17.0.drv' failed with exit code 1;
       last 10 log lines:
       > FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func2-True] - AssertionError:
       > FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func2-False] - AssertionError:
       > FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func3-True] - AssertionError:
       > FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func3-False] - AssertionError:
       > FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func4-True] - AssertionError:
       > FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func4-False] - AssertionError:
       > FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func5-True] - AssertionError:
       > FAILED test/integration/test_integration_rioxarray.py::test_clip_geojson[open_func5-False] - AssertionError:
       > = 13 failed, 440 passed, 17 skipped, 8 deselected, 1 xfailed, 3 xpassed, 385 warnings in 13.64s =

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test Test related changes
Projects
None yet
Development

No branches or pull requests

3 participants