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

Upstream build failing for 2 weeks #477

Closed
hammer opened this issue Mar 4, 2021 · 3 comments · Fixed by #485
Closed

Upstream build failing for 2 weeks #477

hammer opened this issue Mar 4, 2021 · 3 comments · Fixed by #485
Labels
bug Something isn't working upstream Used when our build breaks due to upstream changes

Comments

@hammer
Copy link
Contributor

hammer commented Mar 4, 2021

https://github.com/pystatgen/sgkit/actions?query=workflow%3A%22Upstream%22+branch%3Amaster

@hammer hammer added the bug Something isn't working label Mar 4, 2021
@hammer
Copy link
Contributor Author

hammer commented Mar 4, 2021

@tomwhite notes that it would be nice to have an email when this fails

@tomwhite
Copy link
Collaborator

tomwhite commented Mar 8, 2021

The failure is due to pydata/xarray#4940

____________________ test_hwep_dataset__precomputed_counts _____________________

ds_neq = <xarray.Dataset>
Dimensions:             (alleles: 2, ploidy: 2, samples: 1000, variants: 50)
Dimensions without coord..... 0 0 0 0
    call_genotype_mask  (variants, samples, ploidy) bool False False ... False
Attributes:
    contigs:  [0]

    def test_hwep_dataset__precomputed_counts(ds_neq: Dataset) -> None:
        ds = ds_neq
        ac = ds["call_genotype"].sum(dim="ploidy")
        cts = [1, 0, 2]  # arg order: hets, hom1, hom2
        gtc = xr.concat([(ac == ct).sum(dim="samples") for ct in cts], dim="counts").T
        ds = ds.assign(**{"variant_genotype_counts": gtc})
        p = hwep_test(ds, genotype_counts="variant_genotype_counts", merge=False)
>       assert np.all(p < 1e-8)

sgkit/tests/test_hwe.py:143: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
<__array_function__ internals>:5: in all
    ???
/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/numpy/core/fromnumeric.py:2438: in all
    return _wrapreduction(a, np.logical_and, 'all', axis, None, out,
/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/numpy/core/fromnumeric.py:85: in _wrapreduction
    return reduction(axis=axis, out=out, **passkwargs)
/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/xarray/core/common.py:101: in wrapped_func
    return self.reduce(func, dim, numeric_only=numeric_only, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <xarray.Dataset>
Dimensions:              (variants: 50)
Dimensions without coordinates: variants
Data variables:
    variant_hwe_p_value  (variants) bool dask.array<chunksize=(50,), meta=np.ndarray>
func = <function _dask_or_eager_func.<locals>.f at 0x7f825fcef550>, dim = None
keep_attrs = None, keepdims = False, numeric_only = False
kwargs = {'axis': None, 'out': None}

    def reduce(
        self,
        func: Callable,
        dim: Union[Hashable, Iterable[Hashable]] = None,
        keep_attrs: bool = None,
        keepdims: bool = False,
        numeric_only: bool = False,
        **kwargs: Any,
    ) -> "Dataset":
        """Reduce this dataset by applying `func` along some dimension(s).
    
        Parameters
        ----------
        func : callable
            Function which can be called in the form
            `f(x, axis=axis, **kwargs)` to return the result of reducing an
            np.ndarray over an integer valued axis.
        dim : str or sequence of str, optional
            Dimension(s) over which to apply `func`.  By default `func` is
            applied over all dimensions.
        keep_attrs : bool, optional
            If True, the dataset's attributes (`attrs`) will be copied from
            the original object to the new one.  If False (default), the new
            object will be returned without attributes.
        keepdims : bool, default: False
            If True, the dimensions which are reduced are left in the result
            as dimensions of size one. Coordinates that use these dimensions
            are removed.
        numeric_only : bool, optional
            If True, only apply ``func`` to variables with a numeric dtype.
        **kwargs : Any
            Additional keyword arguments passed on to ``func``.
    
        Returns
        -------
        reduced : Dataset
            Dataset with this object's DataArrays replaced with new DataArrays
            of summarized data and the indicated dimension(s) removed.
        """
        if "axis" in kwargs:
>           raise ValueError(
                "passing 'axis' to Dataset reduce methods is ambiguous."
                " Please use 'dim' instead."
            )
E           ValueError: passing 'axis' to Dataset reduce methods is ambiguous. Please use 'dim' instead.

/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/xarray/core/dataset.py:4693: ValueError

@tomwhite
Copy link
Collaborator

tomwhite commented Mar 8, 2021

@tomwhite notes that it would be nice to have an email when this fails

Unfortunately this isn't easy to fix (needs dedicated email account?): https://gh.neting.ccmunity/t/no-email-notification-on-schedule-cron-job-failure/119638. Perhaps we should just manually check the page for the time being.

tomwhite added a commit to tomwhite/sgkit that referenced this issue Mar 8, 2021
@mergify mergify bot closed this as completed in #485 Mar 8, 2021
@hammer hammer added the upstream Used when our build breaks due to upstream changes label Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Used when our build breaks due to upstream changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants