pydata / pydata/xarray

test_save_mfdataset_compute_false_roundtrip fails

Open
#5,246 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

topic-testing
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

What happened:

test_save_mfdataset_compute_false_roundtrip consistently fails in windows-latest-3.9, e.g. https://github.com/pydata/xarray/pull/5244/checks?check_run_id=2485202784

Here's the traceback:

self = <xarray.tests.test_backends.TestDask object at 0x000001FF45A9B640>

    def test_save_mfdataset_compute_false_roundtrip(self):
        from dask.delayed import Delayed
    
        original = Dataset({"foo": ("x", np.random.randn(10))}).chunk()
        datasets = [original.isel(x=slice(5)), original.isel(x=slice(5, 10))]
        with create_tmp_file(allow_cleanup_failure=ON_WINDOWS) as tmp1:
            with create_tmp_file(allow_cleanup_failure=ON_WINDOWS) as tmp2:
                delayed_obj = save_mfdataset(
                    datasets, [tmp1, tmp2], engine=self.engine, compute=False
                )
                assert isinstance(delayed_obj, Delayed)
                delayed_obj.compute()
                with open_mfdataset(
                    [tmp1, tmp2], combine="nested", concat_dim="x"
                ) as actual:
>                   assert_identical(actual, original)
E                   AssertionError: Left and right Dataset objects are not identical
E                   
E                   
E                   Differing data variables:
E                   L   foo      (x) float64 dask.array<chunksize=(5,), meta=np.ndarray>
E                   R   foo      (x) float64 dask.array<chunksize=(10,), meta=np.ndarray>

Anything else we need to know?:

xfailed in https://github.com/pydata/xarray/pull/5245

Environment:

[Eliding since it's the test env]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with xarray.tests.test_backends.TestDask.test_save_mfdataset_compute_false_roundtrip and the linked Windows CI failure. Reproduce it on windows-latest-3.9, then inspect the save_mfdataset/open_mfdataset roundtrip behavior and the xfailed case in pull request 5245. Done means the test passes and the roundtripped dataset is identical to the original.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.