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

Test on Python 3.11 #1080

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Test on Python 3.11 #1080

merged 1 commit into from
Sep 5, 2023

Conversation

tomwhite
Copy link
Collaborator

@tomwhite tomwhite commented May 3, 2023

@tomwhite
Copy link
Collaborator Author

tomwhite commented May 3, 2023

From https://github.com/pystatgen/sgkit/actions/runs/4870994546/jobs/8687416800?pr=1080:

Successfully built callee scikit-allel msprime bed-reader cbgen asv feedgen asciitree

We should open I have opened upstream issues for Python 3.11 wheels for msprime, bed-reader, and cbgen.

The failure is in Numba - something that seems to only happen on Python 3.11. Worth reporting @timothymillar?

_______ test_pedigree_inverse_kinship__raise_on_singular_kinship_matrix ________

    def test_pedigree_inverse_kinship__raise_on_singular_kinship_matrix():
        ds = sg.simulate_genotype_call_dataset(n_variant=1, n_sample=4, n_ploidy=4, seed=1)
        ds.sample_id.values  # doctest: +NORMALIZE_WHITESPACE
        ds["parent_id"] = ["samples", "parents"], [
            [".", "."],
            [".", "."],
            ["S0", "S0"],
            ["S1", "S2"],
        ]
        ds["stat_Hamilton_Kerr_tau"] = ["samples", "parents"], [
            [1, 1],
            [1, 1],
            [2, 2],
            [2, 2],
        ]
        ds["stat_Hamilton_Kerr_lambda"] = xr.zeros_like(ds["stat_Hamilton_Kerr_tau"], float)
        # check kinship is singular
        K = pedigree_kinship(ds, method="Hamilton-Kerr").stat_pedigree_kinship.values
        with pytest.raises(np.linalg.LinAlgError, match="Singular matrix"):
            np.linalg.inv(K)
        # check sgkit message
        with pytest.raises(ValueError, match="Singular kinship matrix"):
>           pedigree_inverse_kinship(ds, method="Hamilton-Kerr").compute()

sgkit/tests/test_pedigree.py:1340: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/xarray/core/dataset.py:900: in compute
    return new.load(**kwargs)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/xarray/core/dataset.py:734: in load
    evaluated_data = da.compute(*lazy_data.values(), **kwargs)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/base.py:599: in compute
    results = schedule(dsk, keys, **kwargs)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/threaded.py:89: in get
    results = get_async(
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/local.py:511: in get_async
    raise_exception(exc, tb)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/local.py:319: in reraise
    raise exc
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/local.py:224: in execute_task
    result = _execute_task(task, data)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/core.py:119: in _execute_task
    return func(*(_execute_task(a, cache) for a in args))
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/core.py:119: in <genexpr>
    return func(*(_execute_task(a, cache) for a in args))
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/core.py:119: in _execute_task
    return func(*(_execute_task(a, cache) for a in args))
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/optimization.py:990: in __call__
    return core.get(self.dsk, self.outkey, dict(zip(self.inkeys, args)))
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/core.py:149: in get
    result = _execute_task(task, cache)
/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/dask/core.py:119: in _execute_task
    return func(*(_execute_task(a, cache) for a in args))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   raise ValueError("Singular kinship matrix")
E   AssertionError: Unreachable condition reached (op code RERAISE executed)
E   -------------------------------------------------------------------------------
E   This should not have happened, a problem has occurred in Numba's internals.
E   You are currently using Numba version 0.57.0.
E   
E   Please report the error message and traceback, along with a minimal reproducer
E   at: https://github.com/numba/numba/issues/new?template=bug_report.md
E   
E   If more help is needed please feel free to speak to the Numba core developers
E   directly at: https://gitter.im/numba/numba
E   
E   Thanks in advance for your help in improving Numba!

@tomwhite tomwhite added the upstream Used when our build breaks due to upstream changes label May 3, 2023
@timothymillar
Copy link
Collaborator

@tomwhite looks like it's already reported numba/numba#8845

@tomwhite tomwhite force-pushed the python-3.11 branch 3 times, most recently from 52cfe56 to 59a2fd6 Compare August 14, 2023 13:39
@tomwhite
Copy link
Collaborator Author

I excluded the failing Numba test on Python 3.11, since no fix seems forthcoming in Numba.

The Windows build is now failing due to #1109

@tomwhite tomwhite added the auto-merge Auto merge label for mergify test flight label Sep 5, 2023
@tomwhite tomwhite merged commit c897aff into sgkit-dev:main Sep 5, 2023
6 checks passed
@tomwhite tomwhite deleted the python-3.11 branch September 5, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Auto merge label for mergify test flight upstream Used when our build breaks due to upstream changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test on Python 3.11
3 participants