conda-forge / astropy-feedstock

A conda-smithy repository for astropy.
BSD 3-Clause "New" or "Revised" License
5 stars 17 forks source link

astropy fails tests with new numpy2 build #136

Closed erykoff closed 3 months ago

erykoff commented 4 months ago

Solution to issue cannot be found in the documentation.

Issue

The PR #135 was merged, but I am finding a lot of test failures using this build/version. I assume this is related to https://github.com/astropy/astropy/issues/16423 and that released versions of astropy are not yet numpy2 compatible.

I should note that the PR bot added the comment

However, by default, building against numpy 2.0 will assume that the package
is compatible with numpy 2.0, which is not necessarily the case. You should
check that the upstream package explicitly supports numpy 2.0, otherwise you
need to add a - numpy <2 run requirement until that happens (check numpy
issue 26191 for an overview of the most important packages).

Installed packages

# Name                    Version                   Build  Channel
_numpy_rc                 1                    h23db71c_0    conda-forge/label/numpy_rc
astropy                   6.1.0           py312hbebd99a_1    conda-forge
astropy-iers-data         0.2024.5.13.0.30.12    pyhd8ed1ab_0    conda-forge
asttokens                 2.0.5              pyhd3eb1b0_0  
attrs                     23.1.0          py312hca03da5_0  
black                     24.3.0          py312hca03da5_0  
bzip2                     1.0.8                h80987f9_6  
ca-certificates           2024.3.11            hca03da5_0  
cffi                      1.16.0          py312h80987f9_1  
click                     8.1.7           py312hca03da5_0  
coverage                  7.2.2           py312h80987f9_0  
decorator                 5.1.1              pyhd3eb1b0_0  
eigen                     3.4.0                h48ca7d4_0  
executing                 0.8.3              pyhd3eb1b0_0  
fftw                      3.3.9                h80987f9_2  
future                    0.18.3          py312hca03da5_0  
galsim                    2.5.2                    pypi_0    pypi
hypothesis                6.100.1         py312hca03da5_0  
importlib-metadata        7.0.1           py312hca03da5_0  
iniconfig                 1.1.1              pyhd3eb1b0_0  
ipython                   8.20.0          py312hca03da5_0  
jedi                      0.18.1          py312hca03da5_1  
libblas                   3.9.0           1_h9886b1c_netlib  
libcblas                  3.9.0           1_h9886b1c_netlib  
libcxx                    17.0.6               h5f092b4_0    conda-forge
libexpat                  2.6.2                hebf3989_0    conda-forge
libffi                    3.4.4                hca03da5_1  
libgfortran               5.0.0           13_2_0_hd922786_3    conda-forge
libgfortran5              13.2.0               hf226fd6_3    conda-forge
liblapack                 3.9.0           1_h9886b1c_netlib  
libsqlite                 3.45.3               h091b4b1_0    conda-forge
libzlib                   1.2.13               h53f4e23_5    conda-forge
llvm-openmp               14.0.6               hc6e5704_0  
lsstdesc.coord            1.3.0           py312h389731b_1    conda-forge
markdown-it-py            2.2.0           py312hca03da5_1  
matplotlib-inline         0.1.6           py312hca03da5_0  
mdurl                     0.1.0           py312hca03da5_0  
mypy_extensions           1.0.0           py312hca03da5_0  
ncurses                   6.5                  hb89a1cb_0    conda-forge
numpy                     2.0.0rc2        py312hb84bddb_0    conda-forge
openssl                   3.3.0                h0d3ecfb_0    conda-forge
packaging                 23.2            py312hca03da5_0  
parso                     0.8.3              pyhd3eb1b0_0  
pathspec                  0.10.3          py312hca03da5_0  
pexpect                   4.8.0              pyhd3eb1b0_3  
pip                       24.0            py312hca03da5_0  
platformdirs              3.10.0          py312hca03da5_0  
pluggy                    1.0.0           py312hca03da5_1  
prompt-toolkit            3.0.43          py312hca03da5_0  
prompt_toolkit            3.0.43               hd3eb1b0_0  
psutil                    5.9.0           py312h80987f9_0  
ptyprocess                0.7.0              pyhd3eb1b0_2  
pure_eval                 0.2.2              pyhd3eb1b0_0  
pybind11                  2.12.0          py312h48ca7d4_0  
pybind11-global           2.12.0          py312h48ca7d4_0  
pycparser                 2.21               pyhd3eb1b0_0  
pyerfa                    2.0.1.4         py312hbebd99a_1    conda-forge
pygments                  2.15.1          py312hca03da5_1  
pytest                    7.4.0           py312hca03da5_0  
pytest-arraydiff          0.3             py312h989b03a_0  
pytest-astropy            0.10.0          py312hca03da5_0  
pytest-astropy-header     0.1.2              pyhd3eb1b0_0  
pytest-cov                4.1.0           py312hca03da5_1  
pytest-doctestplus        0.11.1             pyhd3eb1b0_0  
pytest-filter-subpackage  0.1.1              pyhd3eb1b0_0  
pytest-mock               3.10.0          py312hca03da5_0  
pytest-openfiles          0.5.0              pyhd3eb1b0_0  
pytest-remotedata         0.3.2           py312hca03da5_0  
python                    3.12.3          h4a7b5fc_0_cpython    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pyyaml                    6.0.1           py312h80987f9_0  
readline                  8.2                  h1a28f6b_0  
rich                      13.3.5          py312hca03da5_1  
scipy                     1.13.0          py312h14ffa8f_1    conda-forge
setuptools                69.5.1          py312hca03da5_0  
six                       1.16.0             pyhd3eb1b0_1  
sortedcontainers          2.4.0              pyhd3eb1b0_0  
stack_data                0.2.0              pyhd3eb1b0_0  
tk                        8.6.14               h6ba3021_0  
toml                      0.10.2             pyhd3eb1b0_0  
traitlets                 5.7.1           py312hca03da5_0  
tzdata                    2024a                h04d1e81_0  
wcwidth                   0.2.5              pyhd3eb1b0_0  
wheel                     0.43.0          py312hca03da5_0  
xz                        5.4.6                h80987f9_1  
yaml                      0.2.5                h1a28f6b_0  
zipp                      3.17.0          py312hca03da5_0  
zlib                      1.2.13               h53f4e23_5    conda-forge

Environment info

active environment : galsim-np2
    active env location : /Users/erykoff/lsst/20240104/conda/envs/galsim-np2
            shell level : 2
       user config file : /Users/erykoff/.condarc
 populated config files : /Users/erykoff/lsst/20240104/conda/.condarc
                          /Users/erykoff/.condarc
          conda version : 23.3.1
    conda-build version : not installed
         python version : 3.10.12.final.0
       virtual packages : __archspec=1=arm64
                          __osx=14.4.1=0
                          __unix=0=0
       base environment : /Users/erykoff/lsst/20240104/conda  (writable)
      conda av data dir : /Users/erykoff/lsst/20240104/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/label/numpy_rc/osx-arm64
                          https://conda.anaconda.org/conda-forge/label/numpy_rc/noarch
                          https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /Users/erykoff/lsst/20240104/conda/pkgs
                          /Users/erykoff/.conda/pkgs
       envs directories : /Users/erykoff/lsst/20240104/conda/envs
                          /Users/erykoff/.conda/envs
               platform : osx-arm64
             user-agent : conda/23.3.1 requests/2.31.0 CPython/3.10.12 Darwin/23.4.0 OSX/14.4.1
                UID:GID : 501:20
             netrc file : None
           offline mode : False
pllim commented 4 months ago

Yeah, we plan to push out v6.1.1 when numpy 2.0 is released, I think. cc @mwcraig @astrofrog @saimn @neutrinoceros

neutrinoceros commented 4 months ago

I assume this is related to https://github.com/astropy/astropy/issues/16423 and that released versions of astropy are not yet numpy2 compatible.

Depends what kind of failure you're seeing. Astropy 6.1.0 was intended to be numpy2 compatible but indeed we missed a couple issues regarding string representation of scalars. All known issues have known solutions (3/5 already merged and backported). I think we should probably cut a 6.1.1 when we get them all in, and that waiting for numpy 2.0.0 final would only expose end users to these issues (6.1.0 removed the <2 pin). However, I'd like to know more about the failures you're seeing. If you still get any with np.set_printoptions(legacy="1.25"), that would need to be reported, otherwise, we're already on it ! :-)

neutrinoceros commented 4 months ago

@erykoff could you specify the list of tests you saw fail please ? We have addressed every known issue in main and are set for a truly compatible 6.1.1 release, I would feel more comfortable knowing we haven't left anything out.

pllim commented 3 months ago

Should have been fixed by #138

pllim commented 3 months ago

I cannot close this, so please close it. Thanks.