Skip to content

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

Open

Description

@GaetanLepage

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

Activity

  1. GaetanLepage commented on Jun 17, 2024

    @GaetanLepage
    Author

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

  2. snowman2 commented on Jun 20, 2024

    @snowman2
    Member

    Looks like the data is shifted one cell over.

  3. changed the title [-][BUG] Several `AssertionError`s in tests on `aarch64-linux`[/-] [+]TST: Several `AssertionError`s in tests on `aarch64-linux`[/+] on Jun 21, 2024
  4. schrobingus commented on Aug 2, 2024

    @schrobingus

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtestTest related changes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions